cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A003995 Sum of (any number of) distinct squares: of form r^2 + s^2 + t^2 + ... with 0 <= r < s < t < ...

Original entry on oeis.org

0, 1, 4, 5, 9, 10, 13, 14, 16, 17, 20, 21, 25, 26, 29, 30, 34, 35, 36, 37, 38, 39, 40, 41, 42, 45, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 97
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A001983, A033461, A008935. Complement of A001422.

Programs

  • Haskell
    a003995 n = a003995_list !! (n-1)
    a003995_list = filter (p a000290_list) [0..]
       where p (q:qs) m = m == 0 || q <= m && (p qs (m - q) || p qs m)
    -- Reinhard Zumkeller, Apr 22 2013
  • Mathematica
    lim = 10; s = {0}; Do[s = Union[s, s + n^2], {n, lim}]; Select[s, 0 <= # <= lim^2 &] (* T. D. Noe, Jul 10 2012 *)
  • PARI
    a(n)=if(n<1,0,n=a(n-1); until(polcoeff(prod(k=1,sqrt(n),1+x^k^2), n), n++); n)
    

Formula

Exponents in expansion of (1+x)*(1+x^4)*(1+x^9)*(1+x^16)*(1+x^25)*(1+x^36)*(1+x^49)*(1+x^64)*(1+x^81)*(1+x^100)*(1+x^121)*(1+x^144)*...
For n > 98, a(n) = n + 30. - Charles R Greathouse IV, Sep 02 2011 (This implies a(n+2) = 2*a(n+1)-a(n) for n > 98.)

A329752 a(0) = 0, a(n) = a(floor(n/2)) + (n mod 2) * floor(log_2(2n))^2 for n > 0.

Original entry on oeis.org

0, 1, 1, 5, 1, 10, 5, 14, 1, 17, 10, 26, 5, 21, 14, 30, 1, 26, 17, 42, 10, 35, 26, 51, 5, 30, 21, 46, 14, 39, 30, 55, 1, 37, 26, 62, 17, 53, 42, 78, 10, 46, 35, 71, 26, 62, 51, 87, 5, 41, 30, 66, 21, 57, 46, 82, 14, 50, 39, 75, 30, 66, 55, 91, 1, 50, 37, 86
Offset: 0

Views

Author

Alois P. Heinz, Nov 20 2019

Keywords

Examples

			For n = 11 = 1011_2 we have a(11) = 1^2 + 3^2 + 4^2 = 1 + 9 + 16 = 26.
		

Crossrefs

Programs

  • Maple
    a:= n-> (l-> add(l[-i]*i^2, i=1..nops(l)))(convert(n, base, 2)):
    seq(a(n), n=0..80);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 0,
          a(iquo(n, 2))+`if`(n::odd, ilog2(2*n)^2, 0))
        end:
    seq(a(n), n=0..80);

Formula

If n = Sum_{i=0..m} c(i)*2^i, c(i) = 0 or 1, then a(n) = Sum_{i=0..m} c(i)*(m+1-i)^2.
a(2^n-1) = n*(n+1)*(2*n+1)/6 = A000330(n).
a(2^n) = 1.
a(2^n+1) = n^2 + 1 = A002522(n).

A178132 Partial sums of A003995.

Original entry on oeis.org

0, 1, 5, 10, 19, 29, 42, 56, 72, 89, 109, 130, 155, 181, 210, 240, 274, 309, 345, 382, 420, 459, 499, 540, 582, 627, 673, 722, 772, 823, 875, 928, 982, 1037, 1093, 1150, 1208, 1267, 1328, 1390, 1453, 1517, 1582, 1648, 1716, 1785, 1855, 1926, 1999, 2073, 2148
Offset: 0

Views

Author

Jonathan Vos Post, May 20 2010

Keywords

Comments

Partial sums of sum of (any number of) distinct squares. The subsequence of primes in this partial sum begins: 5, 19, 29, 89, 109, 499, 673, 823, 1093, 1453, 1999, 2543, 2963.

Examples

			a(13) = 0 + 1 + 4 + 5 + 9 + 10 + 13 + 14 + 16 + 17 + 20 + 21 + 25 + 26 = 181 is prime.
		

Crossrefs

Formula

a(n) = SUM[i=0..n] A003995(i) = SUM[i=0..n] (r^2 + s^2 + t^2+ ...) with 0<=r

A309801 If 2*n = Sum (2^e_k) then a(n) = Sum (e_k^n).

Original entry on oeis.org

1, 4, 9, 81, 244, 793, 2316, 65536, 262145, 1049600, 4196353, 17308657, 68703188, 273234809, 1088123500, 152587890625, 762939453126, 3814697527769, 19073486852414, 95370918425026, 476847618556329, 2384217176269538, 11921023106645561, 59886119752101281
Offset: 1

Author

Ilya Gutkovskiy, Aug 17 2019

Keywords

Comments

Replace 2^k with (k + 1)^n in binary representation of n.

Examples

			14 = 2*7 = 2^1 + 2^2 + 2^3 so a(7) = 1^7 + 2^7 + 3^7 = 2316.
		

Crossrefs

Programs

  • Mathematica
    Table[Reverse[#].Range[Length[#]]^n &@IntegerDigits[n, 2], {n, 1, 24}]
    Table[SeriesCoefficient[1/(1 - x) Sum[(k + 1)^n x^2^k/(1 + x^2^k), {k, 0, Floor[Log[2, n]] + 1}], {x, 0, n}], {n, 1, 24}]

Formula

a(n) = [x^n] (1/(1 - x)) * Sum_{k>=0} (k + 1)^n*x^(2^k)/(1 + x^(2^k)).

A371629 If 2n = Sum 2^e(k) then a(n) = Sum e(k)^3.

Original entry on oeis.org

1, 8, 9, 27, 28, 35, 36, 64, 65, 72, 73, 91, 92, 99, 100, 125, 126, 133, 134, 152, 153, 160, 161, 189, 190, 197, 198, 216, 217, 224, 225, 216, 217, 224, 225, 243, 244, 251, 252, 280, 281, 288, 289, 307, 308, 315, 316, 341, 342, 349, 350, 368, 369, 376, 377, 405, 406, 413, 414, 432
Offset: 1

Author

Ilya Gutkovskiy, May 24 2024

Keywords

Examples

			To get a(5), we write 10 = 2 + 8 = 2^1 + 2^3 so a(5) = 1^3 + 3^3 = 28.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[Flatten[Position[Reverse[IntegerDigits[n, 2]], 1]]^3]; Table[a[n], {n, 1, 60}]
    nmax = 60; CoefficientList[Series[(1/(1 - x)) Sum[(k + 1)^3 x^(2^k)/(1 + x^(2^k)), {k, 0, Log[2, nmax]}], {x, 0, nmax}], x] // Rest

Formula

G.f.: (1/(1 - x)) * Sum_{k>=0} (k+1)^3 * x^(2^k) / (1 + x^(2^k)).
Showing 1-5 of 5 results.