text:
Sum the means of the two integers
There are quite a few means in mathematics, such as the arithmetic mean, the geometric mean, and many others...
Definitions and Task
Note that these are the definitions for two positive integers*:

The root mean square is the square root of the sum of their squares halved ().
The arithmetic mean is their sum, halved ().
The geometric mean is the square root of their product ().
The harmonic mean is 2 divided by the sum of their inverses ( = ).

Given two integers a and b  such that a, b ∈ [1, +∞), sum the means mentioned above of a and b. Your answers must be accurate to at least 3 decimal places, but you do not have to worry about rounding or floating-point precision errors.
Test Cases

a, b -> Output

7, 6 -> 25.961481565148972
10, 10 -> 40
23, 1 -> 34.99131878607909
2, 4 -> 11.657371451581236
345, 192 -> 1051.7606599443843

You can see the correct results for more test cases using this program. This is code-golf, so the shortest valid submissions that follows the standard rules wins.

* There are many other means, but for the purposes of this challenge we'll use the ones mentioned in the "Definitions" section.

Related.

Must've asked to output the mean of means. -1 (not).

At least there is no Mathematica builtin for that. Right?

@NieDzejkob I don't think so :-)

@NieDzejkob Although I suspect there are builtins for each one of the means.

@EriktheOutgolfer It's not the same

Can we take inputs as 7.0, 6.0?

@icrieverytim yes, you can.

Haskell, 48 bytes
a%b=sum[((a**p+b**p)/2)**(1/p)|p<-[2,1,-1,1e-9]]

Try it online!
This uses the fact that the root-square, arithmetic, harmonic, and geometric means are all special cases of the generalized mean ((a**p+b**p)/2)**(1/p) for p=2,1,-1,0. The geometric mean uses the limit p->0+, approximated as p=1e-9 which suffices for precision.

Mathematica, 37 bytes
-2 bytes thanks to Martin Ender. -6 bytes thanks to Jenny_mathy and function reusability thanks to JungHwan Min.
(t=1##)^.5+(2(s=+##/2)^2-t)^.5+s+t/s&

Try it online!
Mathematica, 55 bytes
RootMeanSquare@#+Mean@#+GeometricMean@#+HarmonicMean@#&

Try it online!
¯\_(ツ)_/¯

I am pretty sure the chain of built-ins is way more verbose than applying the formulas (for some).

@Mr.Xcoder Oh maybe but I thought it'd be more fun to ridicule Mathematica's built-ins! Anyways, here you go, a much less readable golfy version. :3

An alternative: ((#^2+#2^2)/2)^.5+(#+#2)/2+(#1#2)^.5+2#*#2/(#+#2)&

2 bytes off: ((#^2+#2^2)/2)^.5+(+##)/2+(1##)^.5+2/(1/#+1/#2)&

@MartinEnder Does... Does Mathematica turn prefix when you want it to? Oh wait, it changes the head of the list or something..? Thanks! (Also, do you happen to know if I can remove the N@ from the second solution?)

I've explained how those ## tricks work in this tip. And no you can't remove the N@ unless the OP allows exact symbolic solutions, or lets you take the input as a floating-point type.

42 bytes:  (((s=+##)^2-2##)/2)^.5+s/2+(1##)^.5+2##/s&

37 bytes:  (2(s=+##/2)^2-t)^.5+s+(t=1##)^.5+t/s&

A slight fix to @Jenny_mathy's version (same byte count): (t=1##)^.5+(2(s=+##/2)^2-t)^.5+s+t/s&. Just to make it easier to reuse the function (without having to run Clear@t before each iteration).

Python 3, 57 bytes
lambda a,b:(a+b+(a*a+b*b<<1)**.5)/2+(a*b)**.5+2*a*b/(a+b)

Try it online!

The <<1 is going to incorrectly truncate to an integer when a and b are opposite parities.

@xnor No it's not :) You're thinking of >>1.

Oh, my mistake! I see now there's a /2 outside that this is compensating for. Nice trick.

R, 52 bytes
function(a,b,m=(a+b)/2,p=a*b)m+p^.5+(m^2*2-p)^.5+p/m

Try it online!

Octave, 44 42 41 bytes
@(n)(q=mean(n))+rms(n)+(z=prod(n))^.5+z/q

Try it online!
Note that TIO does not have the signal package installed, so I defined rms() in the header. On Octave Online, you can try it if you pkg load nan. I'm not sure if there are any online interpreters that load it by default, but most systems would have this package loaded by default.
Thanks to Tom Carpenter for spotting a small mistake of 2 bytes.
This defines an anonymous function, taking the input as a vector n=[a,b]. We then use inline assignment to reduce the calculation of the HM to just z/q.

You don't need to include the f= in the code, so that makes it 42 bytes. (which of course leads to the "crossed out 44 looks like 44") - Try it online!

Oh oops, that's an artifact from copying it from Octave-Online! Thanks.

TIO loads installed packages by default, it just doesn't have the Signal package installed

@LuisMendo Exactly, I think te de facto standard of MATLAB and Octave is to assume that all packages are installed and loaded.

^.5 saves a byte over sqrt. Also, remove f= from the code part in the link

Haskell, 48 bytes
a?b|s<-a+b,p<-a*b=s/2+sqrt(s^2/2-p)+sqrt p+2*p/s

Try it online!
Explanation:
s/2 = (a+b)/2: The arithmetic mean.
sqrt(s^2/2-p) = sqrt((a^2+2*a*b+b^2)/2-a*b) = sqrt((a^2+b^2)/2): The root mean square.
sqrt p = sqrt(a*b). The geometric mean.
2*p/s = 2*a*b/(a+b). The harmonic mean.

Jelly, 17 bytes
²Æm,P½S
PḤ÷S+Ç+Æm

Try it online!

Nice combination of links. The best I could do in one line is PḤ÷S,µ³²Æm,P½,µÆmFS (19 bytes) - I though it's worth mentioning, maybe it's a source of inspiration. EDIT: >_> I now realise I can just use + instead of ,

@Mr.Xcoder I had an 18-byte version at first (not in revision history) but then thought to put the ones subject to ½ together, and it saved a byte.

Another possible source of inspiration: PḤ÷S can be replaced by: İSHİ

@Mr.Xcoder thought of that too

MATL, 21 18 17 bytes
UYmGphX^GYmGpy/vs

Try it online!
-3 bytes thanks to Luis Mendo.
Explanation
UYm               % Mean of squares,
                  % Stack: { (a^2+b^2)/2 }
   Gp             % Product of input, a*b
                  % Stack: { (a^2+b^2)/2, a*b }
     hX^          % Concatenate into array, take square root of each element.
                  % Stack: { [RMS, HM] }
        GYm       % Arithmetic mean of input.
                  % Stack: { [RMS,GM], AM }
           Gpy    % Product of input, duplicate AM from below.
                  % Stack: { [RMS,GM], AM, a*b, AM
              /   % Divide to get HM
                  % Stack { [RMS,GM], AM, HM}
               vs % Concatenate all to get [RMS,GM,AM,HM], sum.

05AB1E, 18 16 bytes
-2 bytes thanks to Erik the Outgolfer
nO;t¹O;¹Pt2¹zO/O

Explanation:
nO;t                Root mean square
n                    Raise [a, b] to [a ** 2, b ** 2]
 O                   Sum
  ;                  Half
   t                 Square root
    ¹O;             Arithmetic mean
    ¹                Retrieve stored [a, b]
     O               Sum
      ;              Half
       ¹Pt          Geometric mean
       ¹             Retrieve stored [a, b]
        P            Product
         t           Square root
          2¹zO/     Harmonic mean
           ¹         Retrieved stored [a, b]
            z        Vectorised inverse to [1 / a, 1 / b]
             O       Sum
          2   /      Get 2 divided by the sum
               O    Sum of all elements in stack

Try it online!

nO;t¹O;¹Pt2¹zO/O

@EriktheOutgolfer I don't think that works.

Take input as a list [a, b].

@EriktheOutgolfer Of course! Why didn't I think of that.

Husk, 19 bytes
ṁëȯ√½ṁ□o½Σo√Π§/ΣoDΠ

Try it online!
-1 thanks to H.PWiz.

ö√½Σm□ can be ȯ√½ṁ□

@H.PWiz >_> I knew I'd forget something

18 bytes

@H.PWiz still learning! :p

you can change o½Σ    →  Y.

Ohm v2, 16 bytes
²Σ½¬³Π¬³Σ½D³Πs/Σ

Try it online!
Explanation
square sum halve sqrt input product sqrt input sum halve dupe input product swap div sum

...if Ohm had a verbose mode of sorts. :P
²Σ½¬³Π¬³Σ½D³Πs/Σ

                  implicit input       [[7, 6]]
²Σ½¬              root mean square
²                  square              [[49, 36]]
 Σ                 sum                 [85]
  ½                halve               [42.5]
   ¬               square root         [6.519]
    ³Π¬           geometric mean
    ³              push first input    [6.519, [7, 6]]
     Π             product             [6.519, 42]
      ¬            square root         [6.519, 6.481]
       ³Σ½        arithmetic mean
       ³           push first input    [6.519, 6.481, [7, 6]]
        Σ          sum                 [6.519, 6.481, 13]
         ½         halve               [6.519, 6.481, 6.500]
          D³Πs/   harmonic mean
          D        duplicate           [6.519, 6.481, 6.500, 6.500]
           ³       push first input    [6.519, 6.481, 6.500, 6.500, [7, 6]]
            Π      product             [6.519, 6.481, 6.500, 6.500, 42]
             s     swap                [6.519, 6.481, 6.500, 42, 6.500]
              /    divide              [6.519, 6.481, 6.500, 6.461]
               Σ  sum                  [25.961]
                  implicit output      [25.961]

I'm pretty sure I added a built-in for arithmetic mean a little while ago, but it wouldn't save you any bytes here.

TI-Basic (TI-84 Plus CE), 27 25 bytes
√(sum(Ans2)/2)+mean(Ans)+2prod(Ans)/sum(Ans)+√(prod(Ans

-2 bytes from Scrooble
Takes a list of two numbers in Ans, and implicitly returns the sum of the four means; e.g. run with {7,6}:prgmNAME to get 25.96148157.
Explanation:
√(sum(Ans2)/2): 8 bytes: root mean square
mean(Ans): 5 3 bytes: arithmetic mean (old: sum(Ans)/2)
2prod(Ans)/sum(Ans): 8 bytes: harmonic mean
√(prod(Ans: 3 bytes: geometric mean
+3 bytes for 3 +es

I think you have an extra unmatched closing parenthesis here after the 2 in sum(Ans)/2).

@kamoroso94 Fixed, thanks.

Save two bytes with the mean( builtin.

Actually, 15 bytes
æßπ√+ßΣßπτ/+ßµ+

Try it online!
Yay Actually has a built-in for Root Square Mean!

æßπ√+ßΣßπτ/+ßµ+  ~ Full program.

æ                ~ Arithmetic mean.
 ßπ√             ~ Product, Square root (computes geometric mean).
    +            ~ Addition.
     ßΣ          ~ Push the sum of the input.
       ßπτ       ~ Push the product of the input doubled.
          /      ~ Divide.
           +     ~ Addition.
            ßµ   ~ Push Root Square Mean.
              +  ~ Addition.

Groovy, 54 bytes
{a,b->c=a+b;((a*a+b*b)/2)**0.5+c/2+(a*b)**0.5+2*a*b/c}

-2 thanks to Mr. Xcoder for an edit that made me feel dumb.

I think you can replace a**2 with a*a and b**2 with b*b

SOGL V0.12, 22 bytes
+:A½.².²+½√..*:√;«a/¹∑

Try it Here!

Dyalog APL, 44 bytes
{+/(2×o÷k),(.5×k←⍺+⍵),.5*⍨(o←⍺×⍵),.5×+/⍺⍵*2}

Try it online!
Dyadic dfns with a on the left and b on the right.

C# (.NET Core), 76 bytes
+13 bytes for using System;

a=>b=>Math.Sqrt((a*a+b*b)/2)+(a+b)/2+Math.Sqrt(a*b)+2/(1/a+1/b)

Try it online!

You can save a byte by using System; and removing both System.. PS: If you want a less boring way (with the exact same byte-count of 76): using System;a=>b=>(a+b+Math.Sqrt(a*a+b*b<<1))/2+Math.Sqrt(a*b)+2d*a*b/(a+b). ;)

Julia, 49 47 bytes
a$b=(x=a+b)/2+((a^2+b^2)/2)^.5+(y=a*b)^.5+2*y/x

Try it online!

JavaScript, 47 bytes
a=>b=>(c=a+b)/2+(c*c/2-(d=a*b))**.5+d**.5+2*d/c

quite trivial

f =

a=>b=>(c=a+b)/2+(c*c/2-(d=a*b))**.5+d**.5+2*d/c

a = <input id="a" type="number" step="any" value="1" />

b = <input id="b" type="number" step="any" value="1" />

result = <output id="r">4</output>

ARBLE, 49 45 bytes
-4 bytes thanks to Mr. Xcoder
((a^2+b^2)/2)^.5+(a+b)/2+(a*b)^.5+2*a*b/(a+b)

Try it online!

45 bytes

Java 8, 63 bytes
a->b->Math.sqrt((a*a+b*b)/2)+(a+b)/2+Math.sqrt(a*b)+2/(1/a+1/b)

Takes both parameters as Double and outputs as Double.
Try it here.
Or (also 63 bytes):
a->b->(a+b+Math.sqrt(a*a+b*b<<1))/2+Math.sqrt(a*b)+2d*a*b/(a+b)

Takes both parameters as Integer and outputs as Double.
Try it here.

Python 2, 58 bytes
lambda a,b:((a*a+b*b)/2)**.5+(a+b)/2+(a*b)**.5+2*a*b/(a+b)

Try it online!
Takes input as floats

Jq 1.5, 76 bytes
[pow((map(pow(.;2))|add)/2;.5),add/2,pow(.[0]*.[1];.5),2/(map(1/.)|add)]|add

Expanded
[
  pow((map(pow(.;2))|add)/2;.5)  # root mean square
, add/2                          # arithmetic mean
, pow(.[0]*.[1];.5)              # geometric mean
, 2/(map(1/.)|add)               # harmonic mean
]
| add                            # that just about sums it up for mean

Try it online!


text:
Number of distinct non-empty subsequences of binary expansion
A subsequence is any sequence that you can get from another by deleting any amount of characters. The distinct non-empty subsequences of 100 are 0, 1, 00, 10, 100. The distinct non-empty subsequences of 1010 are 0, 1, 00, 01, 10, 11, 010, 100, 101, 110, 1010.
Write a program or function that given a positive integer n returns the number of distinct non-empty subsequences of the binary expansion of n.
Example: since 4 is 100 in binary, and we saw that it had five distinct non-empty subsequences above, so f(4) = 5. Starting from n = 1, the sequence begins:
1, 3, 2, 5, 6, 5, 3, 7, 10, 11, 9, 8, 9, 7, 4, 9, 14, 17, 15, 16, 19, 17, 12

However, your program must work for any n < 250 in under a second on any modern machine. Some large examples:
f(1099511627775) = 40
f(1099511627776) = 81
f(911188917558917) = 728765543
f(109260951837875) = 447464738
f(43765644099) = 5941674

I disagree with the time restriction.

This sounded really familiar, especially after looking at the plot. Turns out I looked into a very closely related sequence earlier this year, but I counted the number of distinct binary numbers, not binary strings, you get when taking subsequences (so I discounted leading zeros). I had even sandboxed it, but due to the equivalence in the Math.SE post, it would have been a dupe of some Stern-Brocot challenge. The plot of your sequence is a bit nicer (i.e. more chaotic) though. :)

@ATaco The time restriction has a good reason. There is an efficient algorithm, and it is interesting yet well golfable. If I don't have a time restriction I feel that nearly every answer would simply brute force all possible subsequences, which very, very quickly wouldn't work anymore. In a sense they're non-answers.

Python 3, 95 bytes  83 bytes
[-12 bytes thanks to Mr.XCoder :)]
def f(x):
 v=[2,1];c=1
 for i in bin(x)[3:]:k=int(i);c+=v[k];v[1-k]+=v[k]
 return c

Try it online!
A note on the algorithm.
The algorithm computes the increment in unique subsequences given by the bit at a given position t.
The increment for the first bit is always 1. The algorithm then runs over the sequence of bits s(t) and adds the increment v[s(t)]. At each step, the increment for the complement of s(t), v[1 - s(t)] is updated to v[1]+v[0].
The final number is the sum of all increments.
It should run in O(log2(n)), where n is the input number.

83 bytes or 83 bytes

JavaScript (ES6), 53 51 bytes
f=(n,r=~(a=[]))=>n<1?~r:f(n/2,r*2-~~a[n&=1],a[n]=r)

Test cases

f=(n,r=~(a=[]))=>n<1?~r:f(n/2,r*2-~~a[n&=1],a[n]=r)

console.log(f(1099511627775))   // 40
console.log(f(1099511627776))   // 81
console.log(f(911188917558917)) // 728765543
console.log(f(109260951837875)) // 447464738
console.log(f(43765644099))     // 5941674

Formatted and commented
f = (                      // f is a recursive function taking:
  n,                       //   n = integer
  r = ~(                   //   r = last result, initially set to -1
    a = []                 //   and using a[] = last results for 0 and 1,
  )                        //   implicitly initialized to [0, 0]
) =>                       //
  n < 1 ?                  // if n is less than 1:
    ~r                     //   we're done: return -(r + 1)
  :                        // else:
    f(                     //   do a recursive call with:
      n / 2,               //     n / 2
      r * 2 - ~~a[n &= 1], //     updated result = r * 2 - last result for this binary digit
      a[n] = r             //     update last result for this binary digit
    )                      //   end of recursive call

Non-recursive version, 63 bytes
Saved 3 bytes thanks to @ThePirateBay
s=>[...s.toString(2)].map(l=c=>l[p=r,r=r*2-~~l[c],c]=p,r=1)|r-1

Test cases

let f =

s=>[...s.toString(2)].map(l=c=>l[p=r,r=r*2-~~l[c],c]=p,r=1)|r-1

console.log(f(1099511627775))   // 40
console.log(f(1099511627776))   // 81
console.log(f(911188917558917)) // 728765543
console.log(f(109260951837875)) // 447464738
console.log(f(43765644099))     // 5941674

I think you can save 3 bytes by assigning the inner function (the first argument of map) to the flag variable l instead of an empty array.

@ThePirateBay Nice one. Thanks!

Python 2, 56 bytes
f=lambda x,a=1,b=1:x and f(x/2,a+~x%2*b,x%2*a+b)or a+b-2

Try it online!
Taking the method from NofP.
59 bytes iteratively:
x=input()
v=[1,1]
while x:v[x%2]=sum(v);x/=2
print sum(v)-2

Try it online!

nice algorithm.  would you mind adding just a short explanation about why it works?

Jelly, 10 bytes
B3;BSṛ¦/’S

This uses @xnor's improvement on @NofP's algorithm.
Try it online!
Background
Let (a1, ..., an) be a finite binary sequence. For each non-negative integer k ≤ n, define ok as the number of unique subsequences of (a1, ..., ak) that are either empty or end in 1, zk as the number of unique subsequences that are either empty or end in 0.
Clearly, o0 = z0 = 1, as the only subsequence of the empty sequence is the empty sequence.
For each index k, the total number of subsequences of (a1, ..., ak) is ok + zk - 1 (subtracting 1 accounts for the fact that both ok and zk count the empty sequence). The total number of non-empty subsequences is therefore ok + zk - 2. The challenge asks to compute on + zn - 2.
Whenever k > 0, we can compute ok and zk recursively. There are two cases:

ak = 1
zk = zk-1, since (a1, ..., ak-1) and (a1, ..., ak-1, 1) have the same subsequences that end in 0.
For each of the ok - 1 non-empty subsequences of (a1, ..., ak) that end in 1, we can remove the trailing 1 to obtain one of the ok-1 + zk-1 - 1 subsequences (a1, ..., ak-1). Conversely, appending a 1 to each of the latter ok-1 + zk-1 - 1 sequences results in one of the ok - 1 former sequences. Thus, ok - 1 = ok-1 + zk-1 - 1 and ok = ok-1 + zk-1.
ak = 0
Similarly to the previous case, we obtain the recursive formulae ok = ok-1 and zk = zk-1 + ok-1.

How it works
B3;BSṛ¦/’S  Main link. Argument: n (positive integer)

B           Binary; convert n to base 2.
 3;         Prepend a 3.
   B        Binary; convert all integers in the resulting array to base 2, mapping
            0 to [0], 1 to [1], and the prepended 3 to [1, 1].
       /    Reduce the resulting array by the quicklink to the left, which will be
            called with left argument [x, y] (integer pair) and right argument [j]
            (either [0] or [1]).
      ¦     Sparse application.
    S           Compute the sum (x + y) and...
     ṛ          for each index in the right argument (i.e., for j)...
            replace the element of [x, y] at that index with (x + y).
       ’    Decrement both integers in the resulting pair.
        S   Take the sum.

hey dennis, would you mind adding a short explanation about why the algorithm works?

I've added an explanation.

05AB1E, 12 bytes
0¸sbvDO>yǝ}O

Try it online! Explanation: As pointed out by the other answers, the number of subsequences for a binary string a..y0 that end in a 1 is the same as the number for the binary string a..y, while the number that end in a 0 is the total number of subsequences for the binary string a..y (which each gain a 0 suffix) plus one for 0 itself. Unlike the other answers I don't include the empty subsequence as this saves a byte constructing the initial state.
0¸s             Push [0] under the input
   b            Convert the input to binary
    v     }     Loop over the digits
     D          Duplicate the array
      O         Take the sum
       >        Increment
        yǝ      Replace the index corresponding to the binary digit
           O    Take the sum of the final array

Java 8, 97 bytes
n->f(n,1,1)long f(long n,long a,long b){return n>0?f(n/2,a+Math.floorMod(~n,2)*b,n%2*a+b):a+b-2;}

Port of @xnor's Python 2 answer, which in turn is an improvement of @NofP's Python 3 answer.
Try it here.

Maybe it's a good thing the restricted-time-tag was present, because I initially had the following to bruteforce all subsequences:
import java.util.*;n->p(n.toString(n,2)).size()-1;Set p(String s){Set r=new HashSet();r.add("");if(s.isEmpty())return r;Set q=p(s.substring(1));r.addAll(q);for(Object o:q)r.add(""+s.charAt(0)+o);return r;}

Try it here.
Which also worked, but took way too long for the last three test cases. Not to mention it's way longer (208 204 bytes).

6502 machine code (C64), 321 bytes
00 C0 20 FD AE A2 00 9D 4F C1 E8 20 73 00 90 F7 9D 4F C1 A0 FF C8 B9 4F C1 D0
FA A2 15 CA 88 30 0A B9 4F C1 29 0F 9D 4F C1 10 F2 A9 00 9D 4F C1 CA 10 F8 A9
00 A0 07 99 64 C1 88 10 FA A0 40 A2 6C 18 BD E4 C0 90 02 09 10 4A 9D E4 C0 E8
10 F2 A2 07 7E 64 C1 CA 10 FA 88 F0 13 A2 13 BD 50 C1 C9 08 30 05 E9 03 9D 50
C1 CA 10 F1 30 D1 A2 0F A9 00 9D 3F C1 CA D0 FA A9 01 8D 3F C1 8D 47 C1 A2 08
CA BD 64 C1 F0 FA A0 09 1E 64 C1 88 90 FA B0 0A CA 30 28 A0 08 1E 64 C1 90 04
A9 47 B0 02 A9 4F 8D AF C0 86 FE A2 F8 18 BD 47 C0 7D 4F C0 9D 47 C0 E8 D0 F4
A6 FE 88 D0 DC F0 D5 A2 F8 BD 47 C0 7D 4F C0 9D 6C C0 E8 D0 F4 AD 64 C1 E9 01
8D 64 C1 A2 F9 BD 6C C0 E9 00 9D 6C C0 E8 D0 F5 A0 15 A9 00 99 4E C1 88 D0 FA
A0 40 A2 13 BD 50 C1 C9 05 30 05 69 02 9D 50 C1 CA 10 F1 0E 64 C1 A2 F9 3E 6C
C0 E8 D0 FA A2 13 BD 50 C1 2A C9 10 29 0F 9D 50 C1 CA 10 F2 88 D0 D1 E0 14 F0
06 E8 BD 4F C1 F0 F6 09 30 99 4F C1 C8 E8 E0 15 F0 05 BD 4F C1 90 F0 A9 00 99
4F C1 A9 4F A0 C1 4C 1E AB

Online demo
Online demo with error checking (346 bytes)
Usage: sys49152,[n], e.g. sys49152,911188917558917.
The time restriction and the test-cases require solutions to calculate in 64bit numbers, so time to prove the C64 qualifies as "modern machine" ;)
Of course, this needs quite a bit of code, the OS doesn't provide anything for integers wider than 16bit. The lame part here: it's yet another implementation (slightly modified) of NofP's algorithm resp. xnor's improved variant. Thanks for the idea ;)

Explanation
Here's a commented disassembly listing of the relevant part doing the algorithm:
.C:c06c  A2 0F       LDX #$0F           ; 15 bytes to clear
.C:c06e  A9 00       LDA #$00
.C:c070   .clearloop:
.C:c070  9D 3F C1    STA .num_a,X
.C:c073  CA          DEX
.C:c074  D0 FA       BNE .clearloop
.C:c076  A9 01       LDA #$01           ; initialize num_a and num_b
.C:c078  8D 3F C1    STA .num_a         ; to 1
.C:c07b  8D 47 C1    STA .num_b
.C:c07e  A2 08       LDX #$08           ; 8 bytes of input to check,
.C:c080   .findmsb:                     ; start at most significant
.C:c080  CA          DEX
.C:c081  BD 64 C1    LDA .nc_num,X
.C:c084  F0 FA       BEQ .findmsb       ; repeat until non-0 byte found
.C:c086  A0 09       LDY #$09           ; 8 bits to check (+1 for pre dec)
.C:c088   .findbit:
.C:c088  1E 64 C1    ASL .nc_num,X      ; shift left, highest bit to carry
.C:c08b  88          DEY
.C:c08c  90 FA       BCC .findbit       ; bit was zero -> repeat
.C:c08e  B0 0A       BCS .loopentry     ; jump into calculation loop
.C:c090   .mainloop:
.C:c090  CA          DEX                ; next byte
.C:c091  30 28       BMI .done          ; index -1? -> done calculating
.C:c093  A0 08       LDY #$08           ; 8 bits to check
.C:c095   .bitloop:
.C:c095  1E 64 C1    ASL .nc_num,X      ; shift left, highest bit to carry
.C:c098  90 04       BCC .tgt_b         ; if 0, store addition result in num_b
.C:c09a   .loopentry:
.C:c09a  A9 47       LDA #$47
.C:c09c  B0 02       BCS .tgt_a         ; ... else store in num_a ...
.C:c09e   .tgt_b:
.C:c09e  A9 4F       LDA #$4F
.C:c0a0   .tgt_a:
.C:c0a0  8D AF C0    STA $C0AF          ; ... using self-modification.
.C:c0a3  86 FE       STX $FE            ; save byte index
.C:c0a5  A2 F8       LDX #$F8           ; index for adding
.C:c0a7  18          CLC
.C:c0a8   .addloop:
.C:c0a8  BD 47 C0    LDA $C047,X        ; load byte from num_a
.C:c0ab  7D 4F C0    ADC $C04F,X        ; add byte from num_b
.C:c0ae  9D 47 C0    STA $C047,X        ; store to num_a or num_b
.C:c0b1  E8          INX                ; next index
.C:c0b2  D0 F4       BNE .addloop       ; done if index overflown
.C:c0b4  A6 FE       LDX $FE            ; restore byte index
.C:c0b6  88          DEY                ; decrement bit index
.C:c0b7  D0 DC       BNE .bitloop       ; bits left in current byte -> repeat
.C:c0b9  F0 D5       BEQ .mainloop      ; else repeat main loop
.C:c0bb   .done:
.C:c0bb  A2 F8       LDX #$F8           ; index for adding
.C:c0bd   .addloop2:
.C:c0bd  BD 47 C0    LDA $C047,X        ; load byte from num_a
.C:c0c0  7D 4F C0    ADC $C04F,X        ; add byte from num_b
.C:c0c3  9D 6C C0    STA $C06C,X        ; store to nc_num (result)
.C:c0c6  E8          INX                ; next index
.C:c0c7  D0 F4       BNE .addloop2      ; done if index overflown
.C:c0c9  AD 64 C1    LDA .nc_num        ; load least significant result byte
.C:c0cc  E9 01       SBC #$01           ; subtract 2 (1 + negated carry)
.C:c0ce  8D 64 C1    STA .nc_num        ; store least significant result byte
.C:c0d1  A2 F9       LDX #$F9           ; index for subtract
.C:c0d3   .subloop:
.C:c0d3  BD 6C C0    LDA $C06C,X        ; subtract 0 from all other bytes
.C:c0d6  E9 00       SBC #$00           ; for handling carry if necessary
.C:c0d8  9D 6C C0    STA $C06C,X
.C:c0db  E8          INX
.C:c0dc  D0 F5       BNE .subloop

The rest is input/output and converting between string and 64bit unsigned integer (little-endian) using some double-dabble algorithm. In case you're interested, here's the whole assembly source for the version with error-checking -- the "golfed" version is in the branch "golf".

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
How can I shorten this python code?
Here is the code which I want to shorten.
n=input()
while n:
 s=raw_input()
 x,r,g,b=(int(x) for x in s.split())
 a=x/r%2
 c=x/g%2
 d=x/b%2
 r=((a*10+c)*10)+d
 if r==0:e="black"
 elif r==100:e="red"
 elif r==1:e="blue"
 elif r==10:e="green"
 elif r==101:e="magenta"
 elif r==11:e="cyan"
 elif r==110:e="yellow"
 else:e="white"
 print(e)
 n-=1

Input:
3
4643 5913 4827 9752
5583 5357 5120 9400
2025 5475 4339 8392

Output:
black
yellow
black

Mind explaining what exactly what this is for, and what you're doing?

This is off topic imo. There is no "winner" and tips are more general.

@Christopher2EZ4RTZ we had many questions like that one before. they are not off topic, this had been discussed for a long time

For the close voters, golfing tips questions are perfectly on-topic here, as decided on meta

Can you give us the problem statement?

Does this even work? Doesn’t the input have to be made into an int?

@Tim Although the question doesn't state it, the code is in Python 2, where input() is equivalent to eval(input()) in Python 3.

Instead of ((a*10+c)*10)+d we can use ((a*2+c)*2)+d to distinguish the colors.
 r=((a*2+c)*2)+d
 if r==0:e="black"
 elif r==4:e="red"
 elif r==1:e="blue"
 elif r==2:e="green"
 elif r==5:e="magenta"
 elif r==3:e="cyan"
 elif r==6:e="yellow"
 else:e="white"

Ah, but now we're just distinguishing between values from 0 to 7, so we can index into an array instead!
 r=a*4+c*2+d
 e=["black","blue","green","cyan","red","magenta","yellow","white"][r]
 # or even shorter:
 e="black blue green cyan red magenta yellow white".split()[r]

Combining with Uriel's changes we get down to 136 bytes (164 bytes saved).
exec'x,r,g,b=map(int,raw_input().split());print"black blue green cyan red magenta yellow white".split()[x/r%2*4+x/g%2*2+x/b%2];'*input()

Try it online!

@RanvijaySingh If you don't mind putting , (commas) between the integers, then you can reach 115 bytes

For the repetition use an exec statement,
map(int, for the conversion of string input into numerals,
shorten calculating r with r=a*100+c*10+d, then put the calculations of each variable (a, c, d) instead of the variable,
and for the conditions use a dictionary with a get query.
Finally, mash everything into one line.
Final result (updating):
exec'x,r,g,b=map(int,raw_input().split());print({0:"black",100:"red",1:"blue",10:"green",101:"magenta",11:"cyan",110:"yellow"}.get((x/r%2)*100+(x/g%2)*10+x/b%2,"white"));'*input()

Bytes saved: 121.

Can you please add a tio link? Thanks!

@Mr.Xcoder I don't know what type of input OP is expecting, so I can't give an example until he does

Btw you can save quite a few bytes using exec"..."*input()

@Mr.Xcoder right, thanks! updating

@RanvijaySingh you're welcome. what is it for btw?

You have some redundant parentheses in there (around print, and (x/r%2)*100 → x/r%2*100 etc.)

@Lynn yea, you covered it better. I just applied golfing techniques - and I'm used to python 3

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Did you hear about alphametics?
Task
The letters spell out actual words, but if you replace each letter with a digit from 0–9, it also “spells” an arithmetic equation. The trick is to figure out which letter maps to each digit. All the occurrences of each letter must map to the same digit, no digit can be repeated, and no “word” can start with the digit 0.
Input
HAWAII + IDAHO + IOWA + OHIO = STATES

Output
510199 + 98153 + 9301 + 3593 = 621246

Input
I + LOVE + YOU = DORA

Output
1 + 2784 + 975 = 3760

    Input
SEND + MORE = MONEY

Output
9567 + 1085 = 10652

Rules

Standard loopholes apply.
shortest code wins.
addition only

Appendix
for other Inputs you gotta keep in mind you can only have 10 different characters(to assign values 0-9)

"No digit can be repeated" means that no two letters can map to the same digit? Also are we guaranteed that the input has a solution? Are we guaranteed that it has a unique solution?

@LuisMendo "addition only" for your second question, but I assume that the = in the first example is a typo.

It can have multiple solutions, BUT the equation must be valid like ‚mama‘ is invalid due to repetition

Yeah == was typo edited

May we take input as STATES = HAWAII + IDAHO + IOWA + OHIO? May we require input to not have spaces?

@Adám you can but don’t have to handle spaces, your input is also fine

I don't understand what's invalid about MAMA (which isn't even an equation to begin with).

@Arnauld no “word” can start with the digit 0

Also this had no winning criterion. I added [tag:code-golf].

What inputs are acceptable? Can we take the input as e.g. [[[S,E,N,D],[M,O,R,E]],[M,O,N,E,Y]]?

Also can we assume that such a mapping is possible?

Will there only be upper case letters A-Z? Can we choose lower case if we want?

The mapping (if <=10 Chars) always has a solution, you can take the input as list.

Upper/lower are allowed. But it‘s either only upper or lower then.

WHO voted duplicate? It’s obviously not?!

@0x45 Your question is a duplicate of this in my opinion. We've had this kind of mapping challenges before. Anyway, if other users disagree they can vote to reopen it. But IMO it is way too closely related to be kept open.

@Mr.Xcoder I don‘t see similarities, but let the community decide

JavaScript (ES7), 104 bytes
f=(s,o,c=s.match(/[A-Z]/))=>c?[...2**29+'4'].some(i=>o&1<<i?0:f(r=s.split(c).join(i),o|1<<i))&&r:eval(s)

Demo

f=(s,o,c=s.match(/[A-Z]/))=>c?[...2**29+'4'].some(i=>o&1<<i?0:f(r=s.split(c).join(i),o|1<<i))&&r:eval(s)

console.log(f('I + LOVE + YOU == DORA'))

Formatted and commented
f = (                               // f = recursive function taking:
  s,                                //   s = input string
  o,                                //   o = bitmask of used digits
  c = s.match(/[A-Z]/)              //   c = next alphabetical character in s
) =>                                //       (either null or a single-element array)
  c ?                               // if c is not null:
    [...2**29 + '4'].some(i =>      //   for each character i of '5368709124'
      o & 1 << i ?                  //     if this digit was already used:
        0                           //       ignore this iteration
      :                             //     else:
        f(                          //       do a recursive call to f() with:
          r = s.split(c).join(i),   //         all characters c replaced with i
          o | 1 << i                //         the updated bitmask
        )                           //       end of recursive call
    ) && r                          //   end of some(): if successful, return r
  :                                 // else:
    eval(s)                         //   evaluate this fully numerical expression

104, since == is allowed


text:
Square pyramidal numbers
A000330 - OEIS
Task
Your task is simple, generate a sequence that, given index i, the value on that position is the sum of squares from 0 upto i where i >= 0.
Example:
Input: 0
Output: 0           (0^2)

Input: 4
Output: 30          (0^2 + 1^2 + 2^2 + 3^2 + 4^2)

Input: 5
Output: 55          (0^2 + 1^2 + 2^2 + 3^2 + 4^2 + 5^2)

Specification:

You may take no input and output the sequence indefinitely;
You may take input N and output the Nth element of the sequence;
You may take input N and output the first N elements of the sequence.

Fun observation from OEIS: This sequence contains exactly two perfect squares: f(1) == 1 * 1 (1), and f(24) == 70 * 70 (4900).

May we begin the sequence at f(1) = 1?

@Emigna sorry but no, you need to start from f(0) = 0. i've pointed out that to the few answers that failed that requirement

The f(0) = 0 requirement ruined a few of my solutions :(

Jelly, 3 bytes
R²S

Try it online!
FGITW
Explanation
R²S  Main Link
R    Generate Range
 ²   Square (each term)
  S  Sum

A longer alternative would be Ræ.R

Python 2, 22 bytes
lambda n:n*~n*~(n*2)/6

Try it online!
This uses the closed-form formula n * (n+1) * (2*n+1) / 6. The code performs the following operations:

Multiplies n by (n*):

The bitwise complement of n (~n), which essentially means -1-n.
And by the bitwise complement of 2n (*~(n*2)), which means -1-2n.

Divides by 6 (/6).

Python 2, 27 bytes
f=lambda n:n and f(n-1)+n*n

Try it online!
Saved 1 byte thanks to Rod and 1 thanks to G B.

This is very clever!

MATL, 3 bytes
:Us

... or them?
Try it online!
Explanation
:Us
:    % Implicit input n. Push range [1 2 ... n]
 U   % Square, element-wise
  s  % Sum of array. Implicit display

JavaScript (ES6), 16 bytes
n=>n*(n+++n)*n/6

Demo

let f =

n=>n*(n+++n)*n/6

for(n = 0; n < 10; n++) {
  console.log('a(' + n + ') = ' + f(n))
}

How?
The expression n+++n is parsed as n++ + n (1). Not that it really matters because n + ++n would also work in this case.
Therefore:
n*(n+++n)*n/6 =
n * (n + (n + 1)) * (n + 1) / 6 =
n * (2 * n + 1) * (n + 1) / 6

which evaluates to sum(k=0...n)(k²).

(1) This can be verified by doing n='2';console.log(n+++n) which gives the integer 5, whereas n + ++n would give the string '23'.

05AB1E, 3 bytes
ÝnO

Try it online!
Explanation
  O    # sum of
 n     # squares of
Ý      # range [0 ... input]

Brain-Flak, 36 bytes
({<(({}[()])())>{({})({}[()])}{}}{})

Try it online!
# Main algorithm
(                                  )  # Push the sum of:
                {({})({}[()])}{}      #   The square of:
 {                              }     #     0 to i

# Stuff for the loop
  <(({}[()])())>                      # Push i-1, i without counting it in the sum
                                 {}   # Pop the counter (0)

Nicely done! :) I came up with ({<(({}))>{({})({}[()])}{}<({}[()])>}) for 38

34 bytes ;)

Brain-Flak, 34 bytes
({(({}[()])()){({}[()])({})}{}}{})

Try it online!
How does it work?
Initially I had the same idea as Riley1 but it felt wrong to use a zeroer.  I then realized that
{({}[()])({})}{}

Calculates n2 - n.
Why?  Well we know
{({})({}[()])}{}

Calculates n2 and loops n times. That means if we switch the order of the two pushes we go from increasing the sum by n + (n-1) each time to increasing the sum by (n-1) + (n-1) each time. This will decrease the result by one per loop, thus making our result n2 - n.  At the top level this -n cancels with the n generated by the push that we were zeroing alleviating the need for a zeroer and saving us two bytes.
Brain-Flak, 36 bytes
({({})(({}[()])){({})({}[()])}{}}{})

Try it online!
Here is another solution, its not as golfy but it's pretty strange so I thought I would leave it as a challenge to figure out how it works.
If you are not into Brain-Flak but you still want the challenge here it is as a summation.

1: I came up with my solution before I looked at the answers here. So no plagiarism here.

I knew there had to be a way to do this, and I had a feeling you would be the one to figure out the math for it.

Husk, 3 bytes
ṁ□ḣ

Try it online!

Hexagony, 23 bytes
?'+)=:!@/*"*'6/{=+'+}/{

Try it online!
Explanation
Unfolded:
   ? ' + )
  = : ! @ /
 * " * ' 6 /
{ = + ' + } /
 { . . . . .
  . . . . .
   . . . .

This is really just a linear program with the / used for some redirection. The linear code is:
?'+){=+'+}*"*'6{=:!@

Which computes n (n+1) (2n+1) / 6. It uses the following memory edges:

Where the memory point (MP) starts on the edge labelled n, pointing north.
?   Read input into edge labelled 'n'.
'   Move MP backwards onto edge labelled 'n+1'.
+   Copy 'n' into 'n+1'.
)   Increment the value (so that it actually stores the value n+1).
{=  Move MP forwards onto edge labelled 'temp' and turn around to face
    edges 'n' and 'n+1'.
+   Add 'n' and 'n+1' into edge 'temp', so that it stores the value 2n+1.
'   Move MP backwards onto edge labelled '2n+1'.
+   Copy the value 2n+1 into this edge.
}   Move MP forwards onto 'temp' again.
*   Multiply 'n' and 'n+1' into edge 'temp', so that it stores the value
    n(n+1).
"   Move MP backwards onto edge labelled 'product'.
*   Multiply 'temp' and '2n+1' into edge 'product', so that it stores the
    value n(n+1)(2n+1).
'   Move MP backwards onto edge labelled '6'.
6   Store an actual 6 there.
{=  Move MP forwards onto edge labelled 'result' and turn around, so that
    the MP faces edges 'product' and '6'.
:   Divide 'product' by '6' into 'result', so that it stores the value
    n(n+1)(2n+1)/6, i.e. the actual result.
!   Print the result.
@   Terminate the program.

In theory it might be possible to fit this program into side-length 3, because the / aren't needed for the computation, the : can be reused to terminate the program, and some of the '"=+*{ might be reusable as well, bringing the number of required commands below 19 (the maximum for side-length 3). I doubt it's possible to find such a solution by hand though, if one exists at all.

Ohm v2, 3 bytes
#²Σ

Try it online!
Explanation
#    Range
 ²   Square
  Σ  Sum

Japt, 3 bytes
ô²x

Try it here.
-1 thanks to Shaggy.
Explanation:
ò²x
ô²  Map square on [0..input]
  x Sum

3 bytes using the shortcut for p2.

@FelipeNardiBatista fixed

Wolfram Language (Mathematica), 14 bytes
Tr[Range@#^2]&

Try it online!

#.#&@Range@#& saves a byte

#.#&@*Range .

Brain-Flak, 46 bytes
{(({})[()])}{}{({({})({}[()])}{}<>)<>}<>({{}})

Try it online!

A little friendly competition :)

@Riley Ooh nice :)

Rather than pushing the square onto the alternate stack, you can sum it directly by evaluating and not pushing it, then pushing the whole loop instead. This changes your second half to ({{({})({}[()])}{}}{}), and saves you 10 bytes. (If that doesn't make sense, ping me in the third stack)

APL (Dyalog), 7 5 bytes
2 bytes saved thanks to @Mego
+.×⍨⍳

Try it online!
How?
⍳ - range
+.× - dot product
⍨ - with itself

@Uriel my bad, i thought the ¨⍳ was necessary

CJam, 10 bytes
ri),{_*+}*

Try it online!
ri            e# Input integer n
  )           e# Add 1
   ,          e# Range [0 1 ... n]
    {   }*    e# Fold (reduce)
     _        e# Duplicate
      *       e# Multiply
       +      e# Add

How about ri),_.*:+ or ri),2f#:+?

@Martin Good idea! I think you should post it as a different answer

Julia, 16 14 bytes
2 bytes saved thanks to @MartinEnder
!n=(x=1:n)⋅x

Try it online!
How?
(x=1:n) creates a range of 1 to n and assign to x,  ⋅ dot product with x.

Brachylog, 5 bytes
⟦^₂ᵐ+

Try it online!
Explanation
⟦        Range
 ^₂ᵐ     Map square
    +    Sum

Actually, 3 bytes
R;*

Try it online!
Takes N as input, and outputs the Nth element in the sequence.
Explanation:
R;*
R    range(1, N+1) ([1, 2, ..., N])
 ;*  dot product with self

Befunge, 16 bytes
&::2*1+*\1+*6/.@

Using the closed-form formula n*(n+1)*(2n+1)/6.
Try it online!
Befunge, 38 bytes
v>::*\1-:v0+_$.@
&^ <     _\:^
>:#^_.@

Using a loop.
Try it online!

R, 17 bytes
sum((0:scan())^2)

Pretty straightforward, it takes advantage from the fact that ^ (exponentiation) is vectorized in R.

(x=0:scan())%*%x is shorter by a byte, but I believe you need a cat to get output.

@Giuseppe I've just tried it and your code works without cat, it outputs a 1x1 matrix.

@RuiBarradas Current meta consensus is that cat is necessary for this to qualify as a full program. If you wish to change that, answer this question and get some traction among the other R people on the site.

CJam, 9 bytes
ri),_.*:+

Try it online!
Explanation
ri        e# Read input and convert to integer N.
  ),      e# Get range [0 1 2 ... N].
    _     e# Duplicate.
     .*   e# Pairwise products, giving [0 1 4 ... N^2].
       :+ e# Sum.

Alternatively:
ri),2f#:+

This squares each element by mapping 2# instead of using pairwise products. And just for fun another alternative which gets inaccurate for large inputs because it uses floating-point arithmetic:
ri),:mh2#

Cubix, 15 bytes
Iu):^\+*p*6u@O,

Try it online!
My code is a bit sad ):
Computes n*(n+1)*(2n+1)/6
    I u
    ) :
^ \ + * p * 6 u
@ O , . . . . .
    . .
    . .

^Iu : read in input, u-turn
    : stack  n
:)\ : dup, increment, go right..oh, hey, it cheered up!
    : stack: n, n+1
+   : sum
    : stack: n, n+1, 2*n+1
*   : multiply
    : stack: n, n+1, 2*n+1, (n+1)*(2*n+1)
p   : move bottom of stack to top
    : stack: n+1, 2*n+1, (n+1)*(2*n+1), n
*   : multiply
6   : push 6
u   : right u-turn
,   : divide
O   : output
@   : terminate

><>, 15 13 11 bytes
Saved 2 bytes thanks to Not a tree
0:n:l1-:*+!

Try it online!
Outputs the sequence indefinitely.

14 bytes (12+2 for -v flag): ::1+:}+**6,n (Try it online!)

Or 11 bytes (prints forever, starting at N=1): Try it online!

@Notatree: Very nice idea using l. Checking with OP if it is okay to start at 1.

@Notatree: Unfortunately we aren't allowed to start at 1, but it still saves 2 bytes. Thanks!

(I should mention that I got the l idea from Martin Ender's Labyrinth answer.)

Labyrinth, 11 bytes
:!\
+ :
*:#

Try it online!
Prints the sequence indefinitely.
Explanation
The instruction pointer just keeps running around the square of code over and over:
:!\    Duplicate the last result (initially zero), print it and a linefeed.
:      Duplicate the result again, which increases the stack depth.
#      Push the stack depth (used as a counter variable).
:*     Square it.
+      Add it to the running total.

Pyth, 7 5 bytes thanks to Steven H
s^R2h

Explanation:
s^R2h       Full program - inputs from stdin and outputs to stdout
s           output the sum of
    h       range(input), with
 ^R2         each element squared

My first solution
sm*ddUh

Try it online!
Explanation:
sm*ddUh    Full program - inputs from stdin and outputs to stdout
s          sum of
 m   Uh    each d in range(input)
  *dd      squared

Is there no square built in in Pyth?

Not as far as I know...

No there is no square built-in Pyth. Also 6 bytes

5 bytes.

Fixable with +1 byte to each answer, I'll edit once I get off of mobile.

Five bytes solution works with versions of the Pyth compiler before this commit.  It's just a bit harder to show off with an online compiler, seeing as all of those have gotten updated since mid-May.

For an alternate five-bytes solution, s^R2h works.  Numbers are turned into ranges with U automatically when mapped.

Haskell, 20 bytes
f 0=0
f n=n*n+f(n-1)

Try it online!

J, 10 9 bytes
4%~3!2*>:

Try it online!
Saved 1 byte using an explicit formula, thanks to miles!

J, 10 bytes
1#.]*:@-i.

J has a range function, but this gives us number from 0 to N-1. To remedy this, we can just take the argument and subtract the range from it, giving us a range from N to 1. This is done with ]   -i.. The rest of the code simply square this list argument (*:@) and then sums it (1#.).
Other contenders
11 bytes: 1#.*:@i.@>:
13 bytes: 1#.[:,@:*/~i.

4%~3!2*>: saves a byte

Excel, 19 bytes
=A1^3/3+A1^2/2+A1/6

Thunno 2 S, 2 bytes
R²

Attempt This Online!
Explanation
R²  # Implicit input
R   # Range of input
 ²  # Square each
    # Sum the list
    # Implicit output

Nekomata, 3 bytes
R:∙

Attempt This Online!
R:∙
R     Range
 :    Duplicate
  ∙   Dot product

Because there isn't a square built-in yet.

Oasis, 4 bytes
nk+0

Try it online!
Explanation
   0      # a(0) = 0
nk+       # a(n) = a(n-1)+n^2

Neim, 3 bytes
ᛦ

This could've been a challenge to show off Neim's polygonal number builtins, but apparently not.
Try it online!

Gaia, 3 bytes
s¦Σ

Try it online!

Ruby, 18 bytes
->n{n*~n*~(n+n)/6}

Using the sama formula as everybody else, saved 1 byte with a double negative multiplication.
Try it online!

Perl 5, 24, 21 bytes
Thanks to Dom, solutions with 21 bytes
$\+=$_--**2while$_}{

or
map$\+=$_**2,1..$_}{

or
$\+=$_**2for 1..$_}{

previous were 21 + 1 -p flag, 3 bytes saved thanks to Xcali
$_*=($_+1)*(2*$_+1)/6

and 23 +1
$_=$_*($_+1)*(2*$_+1)/6

or
$_=$_**3/3+$_**2/2+$_/6

You can shorten this by factoring out the $_ and replacing = with *=: Try it online!

This looks to be 22 bytes (21 + 1 for -p)... But here's one for 21 bytes using a different approach entirely: Try it online!

good point, there is also $\+=$_--**2while$_}{

awk, 25 bytes
{print$1^3/3+$1^2/2+$1/6}

dc, 15 12 bytes
d1+dd+1-**6/

This is simply the factorised Faulhaber polynomial: n(n+1)(2n+1)/6, except that the (2n+1) term is calculated as 2(n+1)-1.

Funky, 33 24 19 bytes
-9 bytes thanks to Dennis
-5 bytes thanks to ASCII-only and bugfixes.
f=n=>n?f(n-1)+n*n:0

Try it online!

26 bytes

Befunge, 28 bytes
&00pg#v_.@
-1:g00<^g00+*:p00

Works for inputs in the range [0, 128). Due to befunge being entirely stack-based, and yet having limited stack manipulation operations available, the only way to work with three values (sum, partial sum, and counter) is to store a value temporarily by modifying the program itself using the p instruction. Since p assigns a value as ASCII, the stored value wraps around at 128, storing a negative value instead of a positive value.
Try it online!
Befunge, 30 bytes
& >::*\:v
$<^-1_v#<@.
_^#:\+<\

Works for pretty much any input.
Try it online!

  Python, 38 33  bytes
 -5 bytes thanks to Martin Ender
g=lambda x:x*x+g(x-1) if x else 0

Haven't seen any solution with recursion yet, so I thought I'd post this one. It may not be really competitive, but this is my first time posting.
Edit: It would've been -11 bytes thanks to Martin Ender, but I would've ended up with the same answer as  Mr. Xcoder's

Welcome to PPCG! Here are a few ideas: x**2 is x*x, you can avoid the parentheses if you just put the condition on top and avoid the <1 if you switch the true and false branches (because 0 is falsy). However, y if x else 0 can be expressed more concisely as x and y, due to the short-circuiting behaviour of and. So you end up with g=lambda x:x and x*x+g(x-1). :)

@Martin Ender  Thank you for the tips. I am going to simplify the **2 and the <1, but I won't replace the ternary operator with the "and" statement, since it will be the same as Mr. Xcoder's second answer.

Jelly, 3 bytes
Rḋ`

Try it online!

Flurry, 30 bytes
{}{({})[<><<>()>]<[][]>}[<>()]

Run example
$ ./flurry -nin -c "{}{({})[<><<>()>]<[][]>}[<>()]" 0
0
$ ./flurry -nin -c "{}{({})[<><<>()>]<[][]>}[<>()]" 1
1
$ ./flurry -nin -c "{}{({})[<><<>()>]<[][]>}[<>()]" 3
14
$ ./flurry -nin -c "{}{({})[<><<>()>]<[][]>}[<>()]" 6
91

The computation is done via the stack, but the final result is outputted from the return value.
Given that we can keep track of iteration indexes using the stack height and multiplication is cheap in Flurry, there's really no "clever" alternative that can lead to shorter code.
{}{...}[<>()]  Repeat the lambda n times with the start value of zero
                 (implicit) push argument x to the stack
  ({})           Pop and re-push x; return x
  [<><<>()>]     succ
  <[][]>         (height ∘ height)
                 In effect, push x and return x + height^2

"succ" hmmm....

Vyxal, 3 bytes
ɾ²∑

Try it Online!
Explained
ɾ²∑
ɾ   # range 1 inclusive [1...n]
 ²  # square
  ∑ # sum

Pyt, 3 bytes
ř²Ʃ

Try it online!
ř²Ʃ
       implicit input
ř      creates array of 1 to n
 ²     squares each element
  Ʃ    sums the list
       implicit print

Arturo, 19 bytes
$=>[∑map&=>[&^2]]

Try it!

Raku, 16 bytes
[\+] {$++²}...*

Try it online!
This is an expression for the lazy infinite sequence of numbers.

{ $++² } ... * is the infinite sequence of square numbers.  $ is an anonymous state variable whose postincremented value is squared to obtain each new element.
[\+] is the sequence of partial sums of that sequence.

Proton, 16 bytes
x=>x*(x+++x)*x/6

Try it online!
Straightforward Solution: range+map(x=>x**2)+sum
-2 bytes thanks to Arnauld('s answer)

QBIC, 13 bytes
[:|p=p+a^2]?p

Explanation
[:|    FOR a = 1 to <input from cmd line>
p=p+   increment p by
a^2    a squared
]      NEXT
?p     PRINT p

Java 8, 78 57 35 16 bytes
@Arnauld port
i->i*(i+++i)*i/6

Pyke, 4 bytes
hLXs

Try it here!
or...
SMXs

4, 39 bytes
3.7006110180020100000030301100001195034

Try it online!
How?
3.
7 00        grid[0] = input()
6 11 01     grid[11] = 1
8 00        while grid[0] != 0:
2 01 00 00     grid[1] = grid[0] * grid[0]
0 03 03 01     grid[3] = grid[3] + grid[1]
1 00 00 11     grid[0] = grid[0] - grid[11]
9
5 03        print(grid[3])
4

Octave, 14 bytes
@(k)(a=0:k)*a'

Try it online!
*Dot product.
Or
@(k)sumsq(0:k)

Try it online!

Haskell, 21 bytes
f n=n*(n+1)*(2*n+1)/6

Try it online!
Boring, straightforward implementation of the closed-form formula on the OEIS page. Expanding into polynomial form doesn't save any bytes: f n=(2*n^3+3*n^2+n)/6.

Same byte count: f n=sum$map(^2)[1..n].

Tcl, 36 bytes
proc S n {expr $n*($n+1)*(2*$n+1)/6}

Try it online!

Longer approach, that does not work well with zero: https://tio.run/##K0nO@f@/oCg/WSFYIU@hujwjMydVIUYFyMzMSy5SKFaITq0oKFJQydNSyYu1BovlKega1loXp5YoFNf@LygtAaoJVjCJ5YIxTWO5lGFsg9j/AA

Another longer approach, that does not work well with zero: https://tio.run/##K0nO@f@/oCg/WSFYIU@huiQzN1WhOjMvuUihWCE6taKgSCEazMuM1VLJjK1VUMmzLk4tUSiu/V9QWgJUEqxgEssFY5rGcinD2Aax/wE

Yet another longer approach, that does not work well with zero: https://tio.run/##K0nO@f@/oCg/WSFYIU@huiQzN1WhOrGgIDUvRaFYQTs6My@5SCEzVksls1ZBJc86taKgSEGluPZ/QWlJsUJ0sIJJLBeMaRrLpQxjG8T@BwA

The same approach as the Javascript answer has one byte more: https://tio.run/##K0nO@f@/oCg/WSFYIU@hOrWioEhBJU9LQyVPOzozL7lIIS9WU0slT9@s9n9BaUmxQnSwgkksF4xpGvsfAA Tks, @Arnauld

ARBLE, 14 13 bytes
-1 bytes thanks to Mr. Xcoder
n*~n*~(n+n)/6

Try it online!

13 bytes

Alice, 17 12 bytes
./ O \d2E+.

Try it online!
Prints the sequence indefinitely.
The trailing linefeed is significant.
Explanation
.   Duplicate the current total. Initially this pushes two zeros onto the
    previously empty stack.
/   Switch to Ordinal.
O   Print the current total with a trailing linefeed.
\   Switch back to Cardinal.
d   Push the stack depth, which acts as a counter variable.
2E  Square it.
+   Add it to the current total.
.   Duplicate it to increment the stack depth for the next iteration.

Retina, 20 bytes
.+
$*
M!&`.+
1
$%_
1

Try it online!
Explanation
.+
$*

Convert input to unary.
M!&`.+

Get all overlapping matches of .+ which turns the input into a range of unary numbers from 1 to n.
1
$%_

Replace each 1 with the entire line its on, squaring the unary value on each line.
1

Count the number of 1s, summing all lines and converting them back to decimal.

Pari/GP, 16 bytes
n->(v=[0..n])*v~

Try it online!

cQuents 0, 3 bytes
;$$

Try it online!
Take that, Oasis.
Explanation
;     Mode: Sum - given n, output the sum of the sequence up to n
 $$   Each term in the sequence equals the index * the index

does not work for input 0

Recursiva, 8 bytes
smBa'Sa'

Try it online!

Bash, 48 30 bytes
echo "$1*($1+1)*(2*$1+1)/6"|bc

Try it online!

Pyth, 10 bytes
VhQ=+Z^N2Z

Outputs the first N elements of the sequence.
Try it online!

How?
VhQ=+Z^N2Z              Full program

VhQ                     Loop until Q + 1 is reached
   =+Z                  Assign and increment Z by ...
      ^N2               ... N squared
         Z              Implicity prints Z

11 byte alternative.
VhQ aY^N2sY

Try it online!

Pushy, 6 bytes
R2KeS#

Try it online!
Explanation
R     Push integers from 1 to implicit n, where n is implicit input
2     Push 2
K     Next command will use the entire stack
e     Pop 2. Raise each of the remaing stack entries to that
S     Sum the entire stack
#     Print as integer

Jq 1.5, 20 bytes
[range(.+1)|.*.]|add

Input is N. Output is N'th element of sequence.  Expanded:
[
    range(.+1)            # generate series 0, 1, 2, 3, ... N
  | .*.                   # square each term
]                         # collect into an array
| add                     # compute the sum

Try it online!

K (oK), 9 bytes
Solution:
+/x*x:!1+

Try it online!
Examples:
> +/x*x:!1+4
30
> +/x*x:!1+5
55

Explanation:
Evaluated right-to-left:
+/x*x:!1+ / solution
       1+ / add 1 to input, 1+4 => 5
      !   / til, !5 => 0 1 2 3 4
    x:    / save as variable x
  x*      / vectorised multiplication, x*x, 0 1 2 3 4*0 1 2 3 4 => 0 1 3 9 16
+/        / addition over (sum), +/0 1 3 9 16 => 30

C#(.NET Core), 20 bytes
a=>a*(a+1)*(2*a+1)/6

Try it online!

R, 16 bytes
(n=0:scan())%*%n

Try it online!

TacO, 10 bytes
@i i
+%+*i

Try it online!

Threead, 40 bytes
I[     -]_
   _^>1
  _2 _r

[<

 lo
 ]
+

Try it online!
De-sliced
This is actually 4 bytes larger, due to whitespace.
I[     -]_   lo
   _^>1   [< ]
  _2 _r     +

Process.

Read an integer into the first value
While the first value is non-zero.

Blank the third value, push 2 onto it.
Blank the second value, then calculate the first value to the power of the third, (i^2)
Move the second value to the right and place a 1 onto it.
Put the value of the first value onto the third value.
Calculate the third value minus the second value (i-1)

Now the second tape contains the squares of all numbers from inp to 1 squared.
Blank the first value
While the second value is non-zero

Move the second tape to the left.
Add the first value to the second value into the third value.
Move the third value into the first value

Now, all the i^2 values are summed together, output the first value.

ReRegex, 53 bytes
#import math
^k([1-9]\d*)/k($1-1)+$1*$1/k0+/0/k#input

Explained
#import math                # Import the math library.
^k([1-9]\d*)/k($1-1)+$1*$1/ # Search the buffer for "k" followed by a non-zero number. Replace it with "k<n-1>+n*n"
k0+/0/                      # Replace k0 with just 0
k#input                     # Default the buffer to k<input>

Try it online!

TI-BASIC, 10 bytes
sum(seq(X²,X,0,Ans

Quite simple. The sum of the sequence of the first Ans squares.

MaybeLater, 36 bytes
n=(readn)/1
write(n*(n+1)*(1+n*2)/6)

Using the closed form formula.
Try it online!

Surely you could have posted two different approaches in the same answer?

Common Lisp, 30 bytes
(loop as i to(read)sum(* i i))

Try it online!

JavaScript (ES6), 18 bytes
f=n=>n&&n*n--+f(n)

Try it

o.innerText=(
f=n=>n&&n*n--+f(n)
)(i.value=8);oninput=_=>o.innerText=f(+i.value)
<input id=i type=number><pre id=o>

TI-Basic, 10 bytes
sum(seq(OO,O,0,Ans

sp00ky

Milky Way, 10 bytes
'L§{:*}G!

Try it online!
Explanation:
'          push input to stack
 L         push inclusive range
  ${  }    map over every element ...
    :*     ... duplicate and multiply (square it)
       G   sum of list
        !  output

Add++, 13 bytes
D,f,@,RdBcB*s

Try it online!
D,f,@,   - Create a monadic function called f. Argument n (example: 5)
      R  - Generate range;   STACK = [[1 2 3 4 5]]
      d  - Duplicate;        STACK = [[1 2 3 4 5] [1 2 3 4 5]]
      Bc - Push the columns; STACK = [[1 1] [2 2] [3 3] [4 4] [5 5]]
      B* - Product of each;  STACK = [1 4 9 16 25]
      s  - Push the sum;     STACK = [1 4 9 16 25 55]
         - Implicitly return 55

Postscript, 149 bytes
/d {def}def
/a {
0 i l 1 0 l
i 2 ge {/i i 1 sub d a}if
} d
/l {rlineto}d
/m {moveto}d
/b {/j exch d /i j d 0 0 m j a j 0 lineto closepath fill}d
5 b

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Hopping numbers
TASK
print integers n, where 12 <= n <= 123456789, and all pairs of consecutive digits in n have the same positive difference between them (e.g. 2468 but not 2469).
NO INPUT.
Output:
12
13
14
15
16
17
18
19
23
24
25
26
27
28
29
34
35
36
37
38
39
45
46
47
48
49
56
57
58
59
67
68
69
78
79
89
123
135
147
159
234
246
258
345
357
369
456
468
567
579
678
789
1234
1357
2345
2468
3456
3579
4567
5678
6789
12345
13579
23456
34567
45678
56789
123456
234567
345678
456789
1234567
2345678
3456789
12345678
23456789
123456789

Rules

Standard loopholes apply.
no input

shortest code wins.
Credits
anarchy golf

This problem is from anarchy golf. You should give it credit (even if you were the one who submitted it)

Do they have to be printed in order?

Yes ascending order

I submitted this problem on anagol :)

Why isn’t every integer 0≤n<100 on this list?

@DonielF Because the integer has to be larger than or equal to 12, and because the forward differences must be positive.

@DonielF difference <= 0 rules them out

Jelly, 12 11 bytes
9œcḊẎIE$ÐfY

Try it online!
How it works
9œcḊẎIE$ÐfY  Main link. No arguments.

9            Set the argument and return value to 9.
   Ḋ         Dequeue; yield [2, ..., 9].
 œc          Take all k-combinations of [1, ..., 9], for each k in [2, ..., 9].
    Ẏ        Concatenate the arrays of k-combinations.
        Ðf   Filter the result by the link to the left.
     IE$         Compute the increments (I) of the combination / digit list and
                 tests if all are equal (E).
          Y  Join the results, separating by linefeeds.

ìà         Find fastest route between two points using Dykstra's Algorithm

Python 2, 81 bytes
k=71
exec"k+=1;r=range(k/8%9+1,10,k%8+1)\nif r[k/72:]:print`r`[1:k/24+2:3]\n"*576

Try it online!
My solution from anarchy golf. The idea is to iterate over all possible triples of length, start value, and step, which gives sorted outputs. The triple is encoded as a value r from 72 to 647, and the components are extracted as k/72, k/8%9, and k%8. Starting k high enough avoids single-digit numbers from being output.
xsot saved two bytes off this by replacing the range with a hardcoded string of digits '123456789'.
This was written under the constraint of a two second runtime limit. A slower strategy that filters numbers rather than generating these may be shorter.

Fun fact: this problem is actually “designed for” the anarchy golf runtime limit, which is why I didn’t submit it to PPCG. I wanted to disqualify submissions looping from 1 to 123456789, instead forcing answers to come up with some clever way to generate the right numbers in the right (sorted) order.

C, 166 152 Bytes
p,l,d,i=11;main(){for(char s[10];i<=1e9;){sprintf(s,"%d",++i);p=0;for(l=strlen(s);--l>0;){d=s[l]-s[l-1];if(!p)p=d;if(p^d|d<1)break;p=d;}if(!l)puts(s);}}

6 bytes saved thanks to @KevinCruijssen!
8 bytes saved thanks to @JonathanFrech!
Try it online
The fully formatted version of the above code can be seen below.
#include <string.h>
#include <stdio.h>

int main( void )
{
int prev_diff, diff, len;
int num = 11;
char str[10];

while(num<123456789)
    {
    prev_diff = 0;
    sprintf(str,"%d",++num);
    len = strlen(str)-1;
    for( ; len > 0; len-- )
        {
        diff = str[len] - str[len-1];
        if( prev_diff == 0 )
            {
            prev_diff = diff;
            }
        if( prev_diff != diff || diff < 1 )
            {
            break;
            }
        prev_diff = diff;
        }
    if ( len == 0 )
        {
        puts(str);
        }
    }
}

Unless I'm missing something, shouldn't while(i<123456789) be while(i<=123456789) instead according to the challenge range? Also, you can golf it by 6 bytes: p,l,d,i=11;main(){for(char s[10];i<=123456789;){sprintf(s,"%d",++i);p=0;for(l=strlen(s);--l>0;){d=s[l]-s[l-1];if(p<1)p=d;if(p^d|d<1)break;p=d;}if(l<1)puts(s);}}

@KevinCruijssen I would agree, although one can most likely keep using the one-byte comparison by choosing a higher value; i<1e9.

@KevinCruijssen Also, if I am not mistaking, l<1 can be golfed to !l, as l never reaches a negative value.

@JonathanFrech Good point about the i<1e9. And !l when l is always >=0 sounds reasonable for C I guess (I've never programmed in C myself).

@KevinCruijssen
"i" is incremented in sprintf(), allowing us to reach allowing us to enter the loop when i == 123456788, and leave it with 123456789.
I'll add those multi-purpose for loops and (l ==0) -> (l < 1) optimizations in, thanks :)

@JonathanFrech Good catches. I'll add !l instead of l<1 and i<1e9. Exponential notation slipped past me, but it makes sense since we can never find a number fitting our constraint above 123456789

@Jacobinski Ah, of course.. How can I forget about i++ right when entering the loop >.> I'm glad the day is almost over, cause I can use a good night sleep. ;p

l,d,i=9;main(){for(char s[10];++i<1e9;){for(sprintf(s,"%d",i),d=0,l=strlen(s);--l>0&&d*(d^(d=s[l]-s[l-1]))<1&d>0;);if(!l)puts(s);}} (131 bytes) All credit goes to @Nevay here, who posted this as a comment in my Java answer that was a port of yours.

Jelly, 14, 13 bytes
DIµEȧ>0Ȧ
Ç77#

Try it online!
One byte saved thanks to @MrXcoder!
This is extremely inefficient, so it'll time out on TIO, but if it ever finishes, it will produce the correct output. You can try it with smaller numbers here: Try it online!
Explanation:
            # Helper link:
            #
D           # The Digits of 'n'
 I          # The increments (deltas, differences) between digits
  µ         # Give that array as an argument to the rest of this link:
   E        # Are all elements equal?
    ȧ       #   AND
     >0     # Are all elements greater then 0?
       Ȧ    # And is there at least one element?
            # (in the differences, so that numbers < 10 are false)
            #
            # Main link:
            #
 77#        # Return the first 77 'n's for which
Ç           #   The helper link is truthy

Ugh. Beat me to it. +1

You do not need the $ at the end of your helper link.

A way clearer way to do this is DIµ>0ȦȧE¶Ç77#

Mathematica, 79 bytes
Select[Range@123456789,Min[s=Union@Differences@IntegerDigits@#]>0&&Tr[1^s]==1&]

Try it online! with a lower number because it is very slow
here is another approach that constructs all the numbers in 1sec
Mathematica, 123 bytes
Union[FromDigits/@(F=Flatten)[Table[Partition[#,i,1],{i,2,9}]&/@Select[F[Table[Range[j,9,k],{j,9},{k,9}],1],Tr[1^#]>1&],2]]

Try it online! all numbers in a sec

05AB1E, 23 bytes
•7=›ζ•FNS¥DËs0›PN11›&&–

Try it online!

Replace •7=›ζ• with 7000 to have it finish on TIO, or just hit the "terminate" button before it times out, resulting in the numbers printed up until that point.

Try using this: žh

@Okx I don't think that would work, it's not just a substring of '0123456789', 1357 for example is also a valid number you need to output.

@EriktheOutgolfer I meant replacing •7=›ζ•

@Okx that's what I had originally, but it causes some weird stuff (?). No idea why, so I ended up with this, which worked consistently.

@MagicOctopusUrn Why don't you try removing the 0 at the start?

@Okx when I used it I casted it as an integer, it still gave odd results, try it.

Husk, 14 13 bytes
ÖifȯεuẊ≠Ṗ…"19

Prints newline-separated numbers to STDOUT.
Try it online!
-1 byte due to inspiration from H.PWiz.
Explanation
ÖifȯεuẊ≠Ṗ…"19
         …"19  The string "19" rangified: "123456789"
        Ṗ      Powerset: ["","1","2","12","3",...,"123456789"]
  fȯ           Filter by function: (input is sublist, say "2469")
      Ẋ≠        Consecutive codepoint differences: [2,2,3]
     u          Remove duplicates: [2,3]
    ε           Is it a one-element list? No, so "2469" is dropped.
Öi             Sort the result by integer value, implicitly print separated by newlines.

Wolfram Language (Mathematica), 76 bytes
Differences@IntegerDigits@#~MatchQ~{a_?Positive..}&&Print@#&~Array~123456789

Try it online!

APL (Dyalog), 37 28 bytes
⍪x/⍨{1=≢∪2-/⍎¨⍕⍵}¨x←11+⍳1E9

Try it online! (with shorter range, due to time-out)
How?
x←11+⍳123456789 - 11, 12... 1e9 into x
¨ - for each
    ⍎¨⍕⍵ - break into digits
    2-/ - get differences list
    ∪ - get unique elements
    1=≢ - length == 1?
x/⍨ - use this as a mask on the range created
⍪ - and columnify

Husk, 14 bytes
ÖifoEẊ≠ftṖ…"19

Try it online!

I stole your ≠. :P I had forgotten it works for characters too

Java 8, 169 168 145 bytes
v->{byte[]a;for(int i=9,d,l;++i<1e9;System.out.print(l<1?i+"\n":""))for(a=(i+"").getBytes(),d=0,l=a.length;--l>0&&d*(d^(d=a[l]-a[l-1]))<1&d>0;);}

Port of @Jacobinski C answer (after I golfed it a bit).
-23 bytes thanks to @Nevay.
Explanation:
Try it here. (It's a bit too slow near the end, so doesn't print the final number on TIO. It prints the final number locally in about 20 seconds, though.)
v->{                         // Method with empty unused parameter and no return-type
  byte[]a;                   //  Byte-array
  for(int i=9,               //  Index integer, starting at 9
          d,                 //  Difference-integer
          l;                 //  Length integer
      ++i<1e9;               //  Loop (1) from 10 to 1,000,000,000 (exclusive)
      System.out.print(      //    After every iteration: print:
        l<1?                 //     If `l` is 0:
         i+"\n"              //      The current integer + a new-line
        :                    //     Else:
         ""))                //      Nothing
    for(a=(i+"").getBytes(), //   Convert the current item as String to a byte-array
        d=0,                 //   Reset the previous integer to 0
        l=a.length;          //   Set `l` to the length of the byte-array
        --l>0                //   Inner loop (2) from `l-1` down to 0 (exclusive)
        &&d*(d^(d=a[l]-a[l-1]))<1
                             //    As long as the previous difference is either 0
                             //    or the current diff is not equal to the previous diff
        &d>0;                //    and the current diff is larger than 0
    );                       //   End of inner loop (2)
                             //  End of loop (1) (implicit / single-line body)
}                            // End of method

145 bytes: v->{byte[]a;for(int i=9,p,l;++i<1e9;System.out.print(l<1?i+"\n":""))for(a=(i+"").getBytes(),p=0,l=a.length;--l>0&&p*(p^(p=a[l]-a[l-1]))<1&p>0;);}

@Nevay I knew it should be able to drop that break somehow and add it to the for-loop check, but this I wouldn't have come up with myself. ;) Thanks!

Batch, 210 200 bytes
No optimizations, so very slow - takes about 25 seconds until 12345, so for the complete output you'd have to wait about 3 days.
@set z=@set/a
%z%c=12
:a
@echo %c%
:c
%z%c+=1&if %c%==123456790 exit/b
%z%n=c
%z%d=n%%10-n/10%%10
@if %d% leq 0 goto c
:d
%z%n=n/10
@if %n% leq 9 goto a
%z%e=n%%10-n/10%%10
@if %e%==%d% goto d
@goto c

Python 2, 103 97 95 bytes
-2 bytes thanks to @JonathanFrech
n=11
while n<1e9:
 n+=1;Q=`n`[1:]
 if`n`<Q>1==len({int(a)-int(b)for a,b in zip(`n`,Q)}):print n

Try it online!

108 bytes or a 106 bytes that runs out of memory, but can be tested with lower numbers

95 bytes; using a variable for the repeated \n`[1:]`.

05AB1E, 14 bytes
TžhŸʒS¥D0›PsË&

Try it online!

That's what I originally had, except I had 12žhŸʒS¥D0›PsË&, I can't get it to run locally. Can you get this to actually execute?

@MagicOctopusUrn If I try replacing the numbers before Ÿ, it works fine

I got my other one to run locally without replacing numbers, but this I still can't. Idk why, I just really want to know what's so different.

JavaScript (Firefox 30-57), 105 bytes

document.write(`<pre>`+(

_=>[for(x of s=`123456789`)for(y of s)for(z of s)if(x*z<10-y)s.replace(/./g,c=>c<y|(c-y)%z|c-y>x*z?``:c)]

)().join`\n`+`</pre>`);

Loops over lengths from 2 to 10 (x is the index of the last character and therefore 1 less than the length), starting digits from 1 to 9 and step from 1 to 9, then filters on the end digit being less than 10 and if so generates the result by filtering out digits from the digit string.

"Run code snippet" leads to an error: Uncaught SyntaxError: Unexpected token for

@schnaader Are you running it in Firefox 30+? This answer uses the non-standard array comprehension syntax which only Firefox supports.

Ah, didn't see the remark, sorry for that. Was running in Chrome, runs fine in Firefox

Python 2, 76 75 bytes
n=9
while n<2e8:
 n+=1
 if`n`in`range(n%10,0,~n%100%11-11)`[-2::-3]:print n

Takes about 3 minutes locally.
Try it online! (modified to print all numbers but the last)

MATL, 17 16 bytes
1e9:"@Vdu0>TX=?@

Try it online!  with 1e9 replaced by 1e3 so that it doesn't time out in the online compiler.

Pyth, 21 bytes
Port of Dennis' clever approach.
jjLkf!t{.+Tsm.cS9dtS9

Try it here!
Pyth, 23 bytes
j.f&!tl{K.+jZT*F>R0K77T

This times out on the online interpreter, but works if given enough time and memory.
Try it online with a lower number.

C (gcc), 106 bytes
main(i,j,k,l){for(i=1;i<9;i++)for(j=8;j;j--)for(k=0;k<j/i;puts(""))for(l=0*k++;l<=i;)putchar(57-j+k*l++);}

Try it online!
The ungolfed (prettified) version:
int main() {
  int length, start_with, max_step, step, nth;
  for (length = 2; length <= 9; length++) {
    for (start_with = 1; start_with < 9; start_with++) {
      max_step = (9 - start_with) / (length - 1);
      for (step = 1; step <= max_step; step++) {
        for (nth = 0; nth < length; nth++) {
          putchar('0' + start_with + step * nth);
        }
        puts("");
      }
    }
  }
  return 0;
}

JavaScript (ES6), 121 bytes
Not nearly as short as Neil's answer, but I thought it was still worth posting.
Works by building a powerset of '123456789' where all non-matching entries are truncated and prefixed with 0, sorting the results in numerical order and keeping only the 77 relevant ones.
_=>[...'123456789'].reduce((a,x)=>[...a,...a.map(y=>y[1]-y[0]+(y.slice(-1)-x)?'0':y+x)],['']).sort((a,b)=>a-b).slice(-77)

Demo

let f =

_=>[...'123456789'].reduce((a,x)=>[...a,...a.map(y=>y[1]-y[0]+(y.slice(-1)-x)?'0':y+x)],['']).sort((a,b)=>a-b).slice(-77)

console.log(f().join` `)

JavaScript (ES6), 109 104 bytes
Works by generating all possible numbers: loops through each increment from 8 to 1 (variable i), loops through each starting digit from 8 to 1 (variable j), loops through each digit between j and 10-i (variable k) and generates a string t by appending k to the current t. At each step t is added to the output array.
(o=[],i=9)=>{while(--i){j=9;while(k=--j){t=""+k;while(k<10-i)o.push(t+=k+=i)}}return o.sort((a,b)=>a-b)}

Try it online!

f=

(o=[],i=9)=>{while(--i){j=9;while(k=--j){t=""+k;while(k<10-i)o.push(t+=k+=i)}}return o.sort((a,b)=>a-b)}

;
console.log(f().join("\n"))

Wolfram Language (Mathematica), 71 bytes
Flatten@Array[If[(x=#2+#3 #)<10,FromDigits@Range[#2,x,#3],{}]&,{8,8,8}]

Try it online!
Lightning fast due to constructing rather than selecting the output.

PHP, 85 84 bytes
for(;++$d<9||++$a<9*$d=1;sort($r))for($x=$y=$a+1;10>$y+=$d;)$r[]=$x.=$y;print_r($r);

try it online.
sorting cost 17 bytes. This version prints the results ordered differently:
while(++$d<9||++$a<9*$d=1)for($x=$y=$a+1;10>$y+=$d;)echo"
",$x.=$y;

JavaScript (ES6), 145 bytes
A straight-forward approach with little magic.

Array(123456790).fill().map((x,i)=>(''+i).split('')).map((a,i,d) => {d=a[1]-a[0];d>0&a.every((n,j)=>j<1||n-a[j-1]==d)?console.log(a.join('')):0})

Running the snippet will consume a lot of memory...

Java (OpenJDK 8), 228 174 170 163 bytes
o->{int i=11,x,y,z,l;for(;i++<1e9;){char[]w=(""+i).toCharArray();for(x=w[1]-w[0],y=1,z=0;y<w.length;z+=l>0&l==x?0:1)l=w[y]-w[y++-1];if(z<1)System.out.println(i);}}

Try it online!


text:
Is my password secure?
Task:
Take a string as input and if it meets the requirements, accept the password.
Input: a string, e.g. someString, asjk23t89h, 123456789abcdef.
Output: two distinct values representing "secure" and "insecure", e.g. 0/1, true/false, secure/insecure.
Password requirements:
In order for a password to be determined as secure, it must:

Be at least 8 characters in length.
Contain at least one character each from the four groups a-z, A-Z, 0-9 and !"£$%^&*()_+-={}[]:@~;'#<>?,./

Examples:

password    -> insecure
password123 -> insecure
L0h~[/1s7C  -> secure
h&fn3*#     -> insecure
C#de g07F   -> secure

Winning:
This is code golf, the shortest answer wins.

Related.

Can you clarify the "ASCII symbol" part? Do you mean any non-letter, non-digit ASCII character (including spaces, linefeeds, and other control characters)? Or do you mean printable/non-whitespace ASCII only? Also what range of characters can appear in the input in the first place?

Did you add a non-ASCII character (£) to the list intentionally?

"Is my password secure?" s->"no" (7 bytes answer in Java \o/)

Java 8, 93 62 65 60 bytes
s->s.matches("([a-z]()|[A-Z]()|\\d()|.()){8,}+\\2\\3\\4\\5")

+3 bytes due to a bugfix, pointed out by @MartinEnder♦.
-5 bytes thanks to @jaytea by using capture groups instead of lookaheads, since the matches are not overlapping.
Old answer with (redundant) dictionary (93 96 bytes):
d->s->!d.contains(s.toLowerCase())&s.matches("(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[\\W_]).{8,}")

Because I can't think of a single word in the dictionary that contains at least one uppercase, lowercase, digit and other ASCII character.. So the dictionary-check is kinda redundant in that case.
Explanation:
Try it here.
s->                    // Method with String parameter and boolean return-type
  s.matches("([a-z]()  //  Checks if the String contains at least one lowercase letter
             |[A-Z]()  //  and at least one uppercase letter
             |\\d()    //  and at least one digit
             .()       //  and at least one other ASCII character
             ){8,}+\\2\\3\\4\\5")
                       //  And has a length of at least 8
                       // End of method (implicit / single-line return-statement)

Here is a trick for golfing multiple, non-overlapping subexpressions that's shorter than using lookaheads: "(a-z|A-Z|\d()|.()){8,}+\2\3\4\5"

Python 2, 112 107 83 86 bytes
lambda s:re.match(r'(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}',s)!=None
import re

Try it online!

You can remove the !=None as the match will either return a truthy or falsey value (a match object or None)


text:
The Binary Square Diagonal Sequence
The binary-square-diagonal-sequence is constructed as follows:

Take the sequence of positive natural numbers: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
Convert each number to binary: 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, ...
Concatenate them: 11011100101110111100010011010101111001101111011111000010001 ...
Starting with n=1, generate squares with increasing side-length n which are filled left-to-right, top-to-bottom with the elements of the above sequence:11 0
1 11 0 0
1 0 1
1 1 01 1 1 1
0 0 0 1
0 0 1 1
0 1 0 10 1 1 1 1
0 0 1 1 0
1 1 1 1 0
1 1 1 1 1
0 0 0 0 1...
Take the diagonal (top left to bottom right) of each square: 1, 11, 100, 1011, 00111, ...
Convert to decimal (ignoring leading zeros):1, 3, 4, 11, 7, ...

Task
Write a program or function which outputs the sequence in one of the following ways:

Return or print the sequence infinitely.
Given input i, return or print the first i elements of the sequence.
Given input i, return or print the ith element of the sequence (either 0 or 1 indexed).

Please state in your answer which output format you choose.
This is code-golf, the shortest answer in each language wins.
Test cases
Here are the first 50 elements of the sequence:
1,3,4,11,7,29,56,141,343,853,321,3558,8176,3401,21845,17129,55518,134717,151988,998642,1478099,391518,7798320,8530050,21809025,61485963,66846232,54326455,221064493,256373253,547755170,4294967295,1875876391,2618012644,24710258456,6922045286,132952028155,217801183183,476428761596,51990767390,687373028085,1216614609441,7677215985062,15384530216172,22714614479340,15976997237789,0,256145539974868,532024704777005,601357273478135

Husk, 15 14 bytes
zȯḋm←CtNCİ□ṁḋN

Try it online!
Continually prints the results as an infinite list.
Explanation
I wonder whether there's a better way to get every nth element from a list than splitting the list into chunks of length n and retrieving the head of each chunk.
      tN          Get a list of all natural numbers except 1. (A)

             N    Get a list of all natural numbers.
           ṁḋ     Convert each to its binary representation and join them
                  all into a single list.
         İ□       Get a list of squares of all natural numbers.
        C         Cut the list of bits into chunks of corresponding sizes. (B)

zȯ                Zip (A) and (B) together with the following function.
     C            Split the bit list (from B) into chunks of the given length
                  (from A).
   m←             Get the head of each chunk. This is the diagonal of the
                  bit list arranged as a square.
  ḋ               Interpret the resulting bits as binary digits and return
                  the result.

To be clear, we extract the diagonal of an n x n square by splitting its linear form into chunks of length n + 1 and retrieving the first element of each chunk:
[[1 , 0 , 1 , 0
  0],[1 , 0 , 1
  1 , 0],[1 , 0
  0 , 1 , 0],[1]]

Python 2, 137 85 bytes
lambda n:int(''.join(bin(x+1)[2:]for x in range(n**3))[n*~-n*(2*n-1)/6:][:n*n:n+1],2)

Try it online!

Python 3, 96 94 bytes
lambda i:int(''.join(bin(x+1)[2:]for x in range(i**3))[sum(x*x for x in range(i))::i+1][:i],2)

Try it online!

05AB1E, 19 17 16 bytes
°LbJsLn£θs>ô€нJC

° is replaced by 3m in the links as ° tends to get very slow.
Try it online!
or as a Test Suite
Explanation
°L                 # push the range [1 ... 10^input]
  bJ               # convert each to binary and join to string
    sLn            # push the range [1 ... input]^2
       £θ          # split the binary string into pieces of these sizes and take the last
         s>ô       # split this string into chunks of size (input+1)
            €н     # get the first digit in each chunk
              JC   # join to string and convert to int

Can't you replace 3m with n?

@EriktheOutgolfer: Yeah I can, thanks! I was pretty sure that didn't work, but that may have been due to kinks in an earlier solution. Same byte count as ° but much faster :P

The numbers from 1 to input^2 are not sufficient. 1 to input^3 like in the python answers seems to be enough.

@ovs: Ah yes, that's why I didn't use it previously. I only checked the first couple of items this time. I'll revert to the previous solution (fortunately at the same byte count)

Java (OpenJDK 8), 215 212 206 202 197 bytes
i->{String b="",t;int s=0,x=++i,j;for(;--x>0;s+=x*x);while(b.length()<s)b+=i.toString(++x,2);for(j=1,s=0;j<i;System.out.println(i.valueOf(t,2)),s+=j*j++)for(t="",x=s;x<s+j*j;x+=j+1)t+=b.charAt(x);}

Try it online!

i->{String b="",t;int s=0,x=++i,j;for(;--x>0;s+=x*x);while(b.length()<s)b+=i.toString(++x,2);for(j=1,s=0;j<i;System.out.println(i.valueOf(t,2)),s+=j*j++)for(t="",x=s;x<s+j*j;x+=j+1)t+=b.charAt(x);} (197 bytes)

Husk, 15 bytes
This takes a somewhat different approach to Martin's answer
moḋz!NCNCṘNNṁḋN

Try it online!
Explanation:
              N   List of all natural numbers
            ṁḋ    Convert each to it's binary representation and flatten
         ṘNN      Repeat the list of natural numbers according the natural numbers:
                  [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5...]
        C         Cut the list of bits into lists of lengths corresponding to the above
      CN          Cut that list into lists of lengths corresponding to the natural numbers
moḋz!N            For each in the list, get the diagonals and convert from binary.
m                   For each list in the list
   z!N              Zip it with natural numbers, indexing.
 oḋ                 Convert to binary

In action
ṁḋN : [1,1,0,1,1,1,0,0,1,0,1,1,1,0,1,1,1,1,0,0,0,1,0,0,1,1,0,1,0,1...]
ṘNN : [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,7,8,8...]
C   : [[1],[1,0],[1,1],[1,0,0],[1,0,1],[1,1,0],[1,1,1,1],[0,0,0,1]...]
CN  : [[[1]],[[1,0],[1,1]],[[1,0,0],[1,0,1],[1,1,0]]...]
m  z!N : [[1],[1,1],[1,0,0],[1,0,1,1],[0,0,1,1,1],[0,1,1,1,0,1]...]
oḋ : [1,3,4,11,7,29,56,141,343,853,321,3558,8176,3401,21845...]

Python 2, 91 bytes
i=n=1;s=''
while 1:
 s+=bin(i)[2:];i+=1
 if s[n*n:]:print int(s[:n*n:n+1],2);s=s[n*n:];n+=1

Try it online!
prints the sequence infinitely

Jelly, 16 bytes
RBFṁ
R²SÇṫ²C$m‘Ḅ

Try it online!
Explanation
RBFṁ  Helper link. Input: integer k
R     Range, [1, 2, ..., k]
 B    Convert each to a list of its binary digits
  F   Flatten
   ṁ  Mold to length k

R²SÇṫ²C$m‘Ḅ  Main link. Input: integer n
R            Range, [1, 2, ..., n]
 ²           Square each
  S          Sum
   Ç         Call helper link on the sum of the first n squares
       $     Monadic chain
     ²         Square n
      C        Complement, 1-n^2
    ṫ        Tail, take the last n^2 elements
        m    Modular indexing, take each
         ‘   (n+1)th element
          Ḅ  Convert from list of binary digits to decimal

Mathematica, 96 bytes
Outputs the ith element of the sequence (1-indexed)
Diagonal@Partition[TakeList[Flatten@IntegerDigits[Range[#^3],2],Range@#^2][[#]],#]~FromDigits~2&

Try it online!

Jelly, 18 bytes
Completely different approach compared to Erik's solution.
Ḷ²S‘ɓ*3B€Fṫ
Çm‘ḣµḄ

Try it online!
How it works

Ḷ²S‘ɓ*3B€Fṫ  - Helper link (monadic).

Ḷ            - Lowered range, generates [0, N).
 ²           - Vectorized square (square each).
  S          - Sum.
   ‘         - Increment, to account for the 1-indexing of Jelly.
     ɓ       - Starts a separate dyadic chain.
     *3      - The input to the power of 3.
       B€    - Convert each to binary.
         F   - Flatten.
          ṫ  - Tail. Return x[y - 1:] (1-indexed).

Çm‘ḣµḄ  - Main link (monadic).

Ç       - Last link as a monad.
 m‘     - Modular input + 1. Get each "input + 1"th element of the list.
   ḣ    - Head. Return the above with elements at index higher than the input cropped.
    µḄ  - Convert from binary to integer.

Saved 1 byte thanks to Jonathan Allan!

Save one using a dyadic chain to remove the ³: Ḷ²S‘ɓ*3B€Fṫ

@JonathanAllan Of course, thanks! I should really learn that trick

Jelly, 22 bytes
²Rµ²Ṭ€Ẏ0;œṗBẎ$³ịs³ŒDḢḄ

Try it online!

Pyth,  27  20 bytes
i<%hQ>s.BS^Q3s^R2QQ2

Verify the first few test cases.
Gets the Ith term of the sequence, 1 indexed.
How it works?
i<%hQ>s.BS^Q3s^R2QQ2   - Full program. Q represents the input.

         S^Q3          - Generate the (inclusive) range [1, Q ^ 3].
       .B              - Convert each to binary.
      s                - Join into a single string.
     >                 - Trim all the elements at indexes smaller than:
               ^R2Q      - The elements of the range [0, Q) squared.
              s          - And summed.
  %hQ                  - Get each Q + 1 element of the list above.
 <                     - Trim all the elements at indexes higher than:
                   Q   - The input.
i                   2  - Convert from binary to integer.

Perl 5, 92 + 1 (-p) = 93 bytes
$s.=sprintf'%b',++$"for 1..$_**3;map{say oct"0b".(substr$s,0,$_*$_,'')=~s/.\K.{$_}//gr}1..$_

Try it online!