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.

Previous Showing 51-56 of 56 results.

A332017 a(n) is the sum of the squares of the lengths of the runs of consecutive equal digits in the binary representation of n.

Original entry on oeis.org

0, 1, 2, 4, 5, 3, 5, 9, 10, 6, 4, 6, 8, 6, 10, 16, 17, 11, 7, 9, 7, 5, 7, 11, 13, 9, 7, 9, 13, 11, 17, 25, 26, 18, 12, 14, 10, 8, 10, 14, 12, 8, 6, 8, 10, 8, 12, 18, 20, 14, 10, 12, 10, 8, 10, 14, 18, 14, 12, 14, 20, 18, 26, 36, 37, 27, 19, 21, 15, 13, 15, 19
Offset: 0

Views

Author

Rémy Sigrist, Feb 04 2020

Keywords

Comments

a(0) = 0 by convention.
Every nonnegative number k appears A006456(k) times in the sequence, the last occurrence being at index A000975(k).

Examples

			For n = 49:
- the binary representation of 49 is "110001",
- we have a run of 2 1's followed by a run of 3 0's followed by a run of 1 1's,
- so a(49) = 2^2 + 3^2 + 1^2 = 14.
		

Crossrefs

Programs

  • PARI
    a(n) = { my (v=0); while (n, my (r=valuation(n+(n%2),2)); v+=r^2; n\=2^r); v }

Formula

a(n) = Sum_{k = 1..A005811(n)} A101211(n, k)^2.
a(A000975(k)) = k for any k >= 0.
a(2^k-1) = k^2 for any k >= 0.
a(2^k) = k^2+1 for any k >= 0.

A275001 Expansion of 1/(1 - Sum_{k>=1} x^(prime(k)^2)).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 2, 0, 0, 1, 3, 1, 0, 1, 4, 3, 0, 1, 6, 6, 1, 1, 8, 10, 4, 1, 10, 17, 10, 2, 12, 27, 20, 6, 14, 40, 38, 16, 17, 56, 68, 36, 25, 76, 114, 75, 43, 101, 180, 147, 81, 137, 273, 271, 159, 194, 401, 471, 313, 292, 579, 782, 601, 472, 832, 1251, 1109, 816
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 24 2016

Keywords

Comments

Number of compositions (ordered partitions) of n into squares of primes (A001248).
From Ilya Gutkovskiy, Feb 12 2017: (Start)
Conjecture(1): every number > 23 is the sum of at most 8 squares of primes.
Conjecture(2): every number > 131 can be represented as a sum of 13 squares of primes. (End)

Examples

			a(17) = 3 because we have [4, 4, 9], [4, 9, 4] and [9, 4, 4].
		

Crossrefs

Programs

  • Mathematica
    nmax = 85; CoefficientList[Series[1/(1 - Sum[x^Prime[k]^2, {k, 1, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: 1/(1 - Sum_{k>=1} x^(prime(k)^2)).

A303909 Expansion of 2*(1 - x)/(3 - theta_3(x)), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 2, 4, 5, 6, 8, 13, 19, 26, 36, 51, 74, 105, 148, 208, 296, 421, 597, 846, 1198, 1699, 2409, 3417, 4843, 6865, 9732, 13799, 19566, 27739, 39325, 55749, 79041, 112063, 158877, 225241, 319331, 452734, 641866, 910001, 1290137, 1829079, 2593169, 3676457, 5212266
Offset: 0

Views

Author

Ilya Gutkovskiy, May 02 2018

Keywords

Comments

First differences of A006456.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<0, 0,
          `if`(n=0, 1, add(b(n-j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n)-`if`(n=0, 0, b(n-1)):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 02 2018
  • Mathematica
    nmax = 50; CoefficientList[Series[2 (1 - x)/(3 - EllipticTheta[3, 0, x]), {x, 0, nmax}], x]
    nmax = 50; CoefficientList[Series[(1 - x)/(1 - Sum[x^k^2, {k, 1, nmax}]), {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[Boole[IntegerQ[k^(1/2)]] a[n - k], {k, 1, n}]; Differences[Table[a[n], {n, -1, 50}]]

Formula

G.f.: (1 - x)/(1 - Sum_{k>=1} x^(k^2)).

A304633 Expansion of 2/((1 - x)*(3 + 2*x - theta_3(x))), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 7, 7, 7, 9, 12, 13, 13, 16, 20, 23, 23, 27, 35, 41, 42, 47, 61, 71, 75, 82, 104, 124, 134, 146, 178, 217, 237, 258, 307, 377, 419, 456, 535, 651, 739, 804, 933, 1126, 1300, 1422, 1629, 1955, 2275, 2513, 2846, 3397, 3972, 4435, 4990, 5904
Offset: 0

Views

Author

Ilya Gutkovskiy, May 15 2018

Keywords

Comments

Partial sums of A280542.

Crossrefs

Programs

  • Mathematica
    nmax = 62; CoefficientList[Series[2/((1 - x) (3 + 2 x - EllipticTheta[3, 0, x])), {x, 0, nmax}], x]
    nmax = 62; CoefficientList[Series[1/((1 - x) (1 - Sum[x^k^2, {k, 2, nmax}])), {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[Boole[IntegerQ[k^(1/2)] && k != 1] a[n - k], {k, 1, n}]; Accumulate[Table[a[n], {n, 0, 62}]]

Formula

G.f.: 1/((1 - x)*(1 - Sum_{k>=2} x^(k^2))).

A329971 Expansion of 1 / (1 - 2 * Sum_{k>=1} x^(k^2)).

Original entry on oeis.org

1, 2, 4, 8, 18, 40, 88, 192, 420, 922, 2024, 4440, 9736, 21352, 46832, 102720, 225298, 494144, 1083804, 2377112, 5213736, 11435312, 25081112, 55010496, 120654744, 264632554, 580419672, 1273036832, 2792156864, 6124049048, 13431901808, 29460245120, 64615275940
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 26 2019

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 32; CoefficientList[Series[1/(1 - 2 Sum[x^(k^2), {k, 1, Floor[Sqrt[nmax]] + 1}]), {x, 0, nmax}], x]
    nmax = 32; CoefficientList[Series[1/(2 - EllipticTheta[3, 0, x]), {x, 0, nmax}], x]
    a[0] = 1; a[n_] := a[n] = Sum[SquaresR[1, k] a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 32}]

Formula

G.f.: 1 / (2 - theta_3(x)), where theta_3() is the Jacobi theta function.
a(0) = 1; a(n) = Sum_{k=1..n} A000122(k) * a(n-k).

A369342 Number of compositions (ordered partitions) of n into squares not greater than sqrt(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 95, 131, 181, 250, 345, 476, 657, 907, 1252, 1728, 2385, 3292, 4544, 6272, 8657, 11949, 16493, 22765, 31422, 43371, 59864, 82629, 114051, 157422, 217286, 299915, 413966, 571388, 788674, 1088589, 1502555
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(1 - Sum[x^(k^2), {k, 1, Floor[n^(1/4)]}]), {x, 0, n}], {n, 0, 46}]
Previous Showing 51-56 of 56 results.