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-10 of 37 results. Next

A063076 Differences of A011757 ("Primes with square indices").

Original entry on oeis.org

5, 16, 30, 44, 54, 76, 84, 108, 122, 120, 166, 182, 184, 234, 192, 260, 264, 294, 304, 342, 378, 342, 408, 426, 414, 468, 488, 474, 516, 576, 588, 576, 604, 590, 696, 694, 728, 694, 756, 828, 774, 776, 870, 862, 852, 1010, 922, 998, 916, 1020, 1032, 1110
Offset: 1

Views

Author

Santi Spadaro, Aug 04 2001

Keywords

Comments

Does a(n) = k^2 have infinitely many solutions? E.g., 16 = 4^2; 576 = 24^2; ...

Crossrefs

Programs

  • Mathematica
    Differences[Prime[Range[60]^2]] (* Harvey P. Dale, May 01 2023 *)
  • PARI
    j=[]; for(n=1,150,j=concat(j, prime((n+1)^2)-prime(n^2))); j
    
  • PARI
    { default(primelimit, 2*10^7); for (n=1, 1000, write("b063076.txt", n, " ", prime((n+1)^2) - prime(n^2)) ) } \\ Harry J. Smith, Aug 17 2009

Extensions

More terms from Jason Earls, Aug 05 2001

A001156 Number of partitions of n into squares.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 8, 9, 10, 10, 12, 13, 14, 14, 16, 19, 20, 21, 23, 26, 27, 28, 31, 34, 37, 38, 43, 46, 49, 50, 55, 60, 63, 66, 71, 78, 81, 84, 90, 98, 104, 107, 116, 124, 132, 135, 144, 154, 163, 169, 178, 192, 201, 209, 220, 235, 247, 256
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n such that number of parts equal to k is multiple of k for all k. - Vladeta Jovovic, Aug 01 2004
Of course p_{4*square}(n)>0. In fact p_{4*square}(32n+28)=3 times p_{4*square}(8n+7) and p_{4*square}(72n+69) is even. These seem to be the only arithmetic properties the function p_{4*square(n)} possesses. Similar results hold for partitions into positive squares, distinct squares and distinct positive squares. - Michael David Hirschhorn, May 05 2005
The Heinz numbers of these partitions are given by A324588. - Gus Wiseman, Mar 09 2019

Examples

			p_{4*square}(23)=1 because 23 = 3^2 + 3^2 + 2^2 + 1^2 and there is no other partition of 23 into squares.
G.f.: A(x) = 1 + x + x^2 + x^3 + 2*x^4 + 2*x^5 + 2*x^6 + 2*x^7 +...
such that the g.f. A(x) satisfies the identity [_Paul D. Hanna_]:
A(x) = 1/((1-x)*(1-x^4)*(1-x^9)*(1-x^16)*(1-x^25)*...)
A(x) = 1 + x/(1-x) + x^4/((1-x)*(1-x^4)) + x^9/((1-x)*(1-x^4)*(1-x^9)) + x^16/((1-x)*(1-x^4)*(1-x^9)*(1-x^16)) + ...
From _Gus Wiseman_, Mar 09 2019: (Start)
The a(14) = 6 integer partitions into squares are:
  (941)
  (911111)
  (44411)
  (44111111)
  (41111111111)
  (11111111111111)
while the a(14) = 6 integer partitions in which the multiplicity of k is a multiple of k for all k are:
  (333221)
  (33311111)
  (22222211)
  (2222111111)
  (221111111111)
  (11111111111111)
(End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000041, A000161 (partitions into 2 squares), A000290, A033461, A131799, A218494, A285218, A304046.
Cf. A078134 (first differences).
Row sums of A243148.
Euler trans. of A010052 (see also A308297).

Programs

  • Haskell
    a001156 = p (tail a000290_list) where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Oct 31 2012, Aug 14 2011
    
  • Magma
    m:=70; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&*[1/(1-x^(k^2)): k in [1..(m+2)]]) )); // G. C. Greubel, Nov 11 2018
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+ `if`(i^2>n, 0, b(n-i^2, i))))
        end:
    a:= n-> b(n, isqrt(n)):
    seq(a(n), n=0..120);  # Alois P. Heinz, May 30 2014
  • Mathematica
    CoefficientList[ Series[Product[1/(1 - x^(m^2)), {m, 70}], {x, 0, 68}], x] (* Or *)
    Join[{1}, Table[Length@PowersRepresentations[n, n, 2], {n, 68}]] (* Robert G. Wilson v, Apr 12 2005, revised Sep 27 2011 *)
    f[n_] := Length@ IntegerPartitions[n, All, Range@ Sqrt@ n^2]; Array[f, 67] (* Robert G. Wilson v, Apr 14 2013 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i^2>n, 0, b[n-i^2, i]]]]; a[n_] := b[n, Sqrt[n]//Floor]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Nov 02 2015, after Alois P. Heinz *)
  • PARI
    {a(n)=polcoeff(1/prod(k=1, sqrtint(n+1), 1-x^(k^2)+x*O(x^n)), n)} \\ Paul D. Hanna, Mar 09 2012
    
  • PARI
    {a(n)=polcoeff(1+sum(m=1, sqrtint(n+1), x^(m^2)/prod(k=1, m, 1-x^(k^2)+x*O(x^n))), n)} \\ Paul D. Hanna, Mar 09 2012
    

Formula

G.f.: Product_{m>=1} 1/(1-x^(m^2)).
G.f.: Sum_{n>=0} x^(n^2) / Product_{k=1..n} (1 - x^(k^2)). - Paul D. Hanna, Mar 09 2012
a(n) = (1/n)*Sum_{k=1..n} A035316(k)*a(n-k). - Vladeta Jovovic, Nov 20 2002
a(n) = f(n,1,3) with f(x,y,z) = if xReinhard Zumkeller, Nov 08 2009
Conjecture (Jan Bohman, Carl-Erik Fröberg, Hans Riesel, 1979): a(n) ~ c * n^(-alfa) * exp(beta*n^(1/3)), where c = 1/18.79656, beta = 3.30716, alfa = 1.16022. - Vaclav Kotesovec, Aug 19 2015
From Vaclav Kotesovec, Dec 29 2016: (Start)
Correct values of these constants are:
1/c = sqrt(3) * (4*Pi)^(7/6) / Zeta(3/2)^(2/3) = 17.49638865935104978665...
alfa = 7/6 = 1.16666666666666666...
beta = 3/2 * (Pi/2)^(1/3) * Zeta(3/2)^(2/3) = 3.307411783596651987...
a(n) ~ 3^(-1/2) * (4*Pi*n)^(-7/6) * Zeta(3/2)^(2/3) * exp(2^(-4/3) * 3 * Pi^(1/3) * Zeta(3/2)^(2/3) * n^(1/3)). [Hardy & Ramanujan, 1917]
(End)

Extensions

More terms from Eric W. Weisstein
More terms from Gh. Niculescu (ghniculescu(AT)yahoo.com), Oct 08 2006

A055875 a(0)=1, a(n) = prime(n^3).

Original entry on oeis.org

1, 2, 19, 103, 311, 691, 1321, 2309, 3671, 5519, 7919, 10957, 14753, 19403, 24809, 31319, 38873, 47657, 57559, 69031, 81799, 96137, 112291, 130073, 149717, 171529, 195043, 220861, 248851, 279431, 312583, 347707, 386093, 427169, 470933, 517553
Offset: 0

Views

Author

Steven Pigeon (pigeon(AT)iro.umontreal.ca), Jul 14 2000

Keywords

Comments

A sequence of increments for Shell sort that produces good results. A bit better than Sedgewick's A036562 and A003462.

Crossrefs

Sequences used for Shell sort: A003462, A033622, A036562, A036564, A036569, A055875.

Programs

  • Magma
    [NthPrime(n^3): n in [0..50] ]; // Vincenzo Librandi, Apr 22 2011
    
  • Mathematica
    {1}~Join~Array[Prime[#^3] &, 35] (* Michael De Vlieger, Apr 13 2021 *)
  • PARI
    first(n) = { my(res = vector(n), t = 0); forprime(p = 2, oo, t++; if(ispower(t, 3, &i), print1([i, p]", "); res[i] = p; if(i >= n, return(concat(1, res))))) } \\ David A. Corneth, Apr 13 2021

Formula

a(n) = A000040(A000578(n)), n>0.

Extensions

More terms from Jonathan Vos Post, Aug 13 2005

A324588 Heinz numbers of integer partitions of n into perfect squares (A001156).

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 23, 28, 32, 46, 49, 53, 56, 64, 92, 97, 98, 106, 112, 128, 151, 161, 184, 194, 196, 212, 224, 227, 256, 302, 311, 322, 343, 368, 371, 388, 392, 419, 424, 448, 454, 512, 529, 541, 604, 622, 644, 661, 679, 686, 736, 742, 776, 784, 827, 838
Offset: 1

Views

Author

Gus Wiseman, Mar 08 2019

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Also products of elements of A011757.

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   2: {1}
   4: {1,1}
   7: {4}
   8: {1,1,1}
  14: {1,4}
  16: {1,1,1,1}
  23: {9}
  28: {1,1,4}
  32: {1,1,1,1,1}
  46: {1,9}
  49: {4,4}
  53: {16}
  56: {1,1,1,4}
  64: {1,1,1,1,1,1}
  92: {1,1,9}
  97: {25}
  98: {1,4,4}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],And@@Cases[FactorInteger[#],{p_,_}:>IntegerQ[Sqrt[PrimePi[p]]]]&]

A123914 a(n) = prime(n)^2 - prime(n^2). Commutator of (primes, squares) at n.

Original entry on oeis.org

2, 2, 2, -4, 24, 18, 62, 50, 110, 300, 300, 542, 672, 656, 782, 1190, 1602, 1578, 2052, 2300, 2246, 2780, 3086, 3710, 4772, 5150, 5090, 5442, 5400, 5772, 8556, 9000, 10032, 9980, 12270, 12174, 13328, 14520, 15146, 16430, 17714, 17660, 20604, 20502, 21200
Offset: 1

Views

Author

Jonathan Vos Post, Oct 28 2006

Keywords

Comments

a(4) = -4 is the only negative value. All values are even. Asymptotically a(n) ~ (n log n)^2 - (n^2) log (n^2) = (n^2)*(log n)^2 - 2*(n^2)*(log n) = (n^2)*((log n)^2 - 2*log n) = O((n^2)*(log n)^2) which is the same as the asymptotic of commutator [primes, triangular numbers] at n, or, for that matter, commutator [primes, k-tonal numbers] at n for any k > 2.
For pi(n^2) - pi(n)^2 see A291440. - Jonathan Sondow, Sep 10 2017
Proof that a(n) > 0 for n <> 4: It is known that pi(k^2) >= pi(k)^2 for k <> 7 (see A291440). Take k = prime(n) to get pi(prime(n)^2) >= pi(prime(n))^2 = n^2 for prime(n) <> 7 = prime(4). Thus for n <> 4 there are at least n^2 primes <= prime(n)^2, so prime(n^2) <= prime(n)^2, implying a(n) >= 0. But a prime cannot equal a square, so a(n) > 0 for n <> 4. - Jonathan Sondow, Nov 04 2017

Examples

			a(1) = prime(1)^2 - prime(1^2) = prime(1)^2 - prime(1^2) = 4 - 2 = 2.
a(2) = prime(2)^2 - prime(2^2) = prime(2)^2 - prime(2^2) = 9 - 7 = 2.
a(3) = prime(3)^2 - prime(3^2) = prime(3)^2 - prime(3^2) = 25 - 23 = 2.
a(4) = prime(4)^2 - prime(4^2) = prime(4)^2 - prime(4^2) = 49 - 53 = -4.
a(5) = prime(5)^2 - prime(5^2) = prime(5)^2 - prime(5^2) = 121 - 97 = 24.
		

References

Crossrefs

Main diagonal of A324799.

Programs

  • Magma
    [NthPrime(n)^2 - NthPrime(n^2): n in [1..60]]; // Vincenzo Librandi, Sep 16 2015
    
  • Mathematica
    f[n_] := Prime[n]^2 - Prime[n^2]; Array[f, 45] (* Robert G. Wilson v,  Oct 29 2006 *)
    Table[(Prime[n])^2 - Prime[n^2], {n,1,300}] (* G. C. Greubel, Sep 15 2015 *)
  • PARI
    vector(100, n, prime(n)^2 - prime(n^2)) \\ Altug Alkan, Oct 05 2015

Formula

a(n) = A001248(n) - A011757(n).
a(n) = commutator [A000040, A000290] at n.
a(n) = square(prime(n)) - prime(square(n)).
a(n) = A000290(A000040(n)) - A000040(A000290(n)). [corrected by Jonathan Sondow, Sep 10 2017]

Extensions

More terms from Robert G. Wilson v, Oct 29 2006

A324587 Heinz numbers of integer partitions of n into distinct perfect squares (A033461).

Original entry on oeis.org

1, 2, 7, 14, 23, 46, 53, 97, 106, 151, 161, 194, 227, 302, 311, 322, 371, 419, 454, 541, 622, 661, 679, 742, 827, 838, 1009, 1057, 1082, 1193, 1219, 1322, 1358, 1427, 1589, 1619, 1654, 1879, 2018, 2114, 2143, 2177, 2231, 2386, 2437, 2438, 2741, 2854, 2933
Offset: 1

Views

Author

Gus Wiseman, Mar 08 2019

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
Also products of distinct elements of A011757.

Examples

			The sequence of terms together with their prime indices begins:
    1: {}
    2: {1}
    7: {4}
   14: {1,4}
   23: {9}
   46: {1,9}
   53: {16}
   97: {25}
  106: {1,16}
  151: {36}
  161: {4,9}
  194: {1,25}
  227: {49}
  302: {1,36}
  311: {64}
  322: {1,4,9}
  371: {4,16}
  419: {81}
  454: {1,49}
  541: {100}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],And@@Cases[FactorInteger[#],{p_,k_}:>k==1&&IntegerQ[Sqrt[PrimePi[p]]]]&]

A351982 Number of integer partitions of n into prime parts with prime multiplicities.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 3, 0, 1, 1, 3, 3, 3, 0, 1, 4, 5, 5, 3, 3, 5, 8, 5, 5, 6, 8, 8, 11, 7, 8, 10, 17, 14, 14, 12, 17, 17, 21, 18, 23, 20, 28, 27, 31, 27, 36, 32, 35, 37, 46, 41, 52, 45, 60, 58, 63, 59, 78, 71, 76, 81, 87, 80, 103, 107, 113, 114, 127
Offset: 0

Views

Author

Gus Wiseman, Mar 18 2022

Keywords

Examples

			The partitions for n = 4, 6, 10, 19, 20, 25:
  (22)  (33)   (55)     (55333)     (7733)       (55555)
        (222)  (3322)   (55522)     (77222)      (77722)
               (22222)  (3333322)   (553322)     (5533333)
                        (33322222)  (5522222)    (5553322)
                                    (332222222)  (55333222)
                                                 (55522222)
                                                 (333333322)
                                                 (3333322222)
		

Crossrefs

The version for just prime parts is A000607, ranked by A076610.
The version for just prime multiplicities is A055923, ranked by A056166.
For odd instead of prime we have A117958, ranked by A352142.
The constant case is A230595, ranked by A352519.
Allowing any multiplicity > 1 gives A339218, ranked by A352492.
These partitions are ranked by A346068.
The non-constant case is A352493, ranked by A352518.
A000040 lists the primes.
A001221 counts constant partitions of prime length, ranked by A053810.
A001694 lists powerful numbers, counted A007690, weak A052485.
A038499 counts partitions of prime length.
A101436 counts parts of prime signature that are themselves prime.
A112798 lists prime indices, reverse A296150, sum A056239.
A124010 gives prime signature, sorted A118914, sum A001222.
A257994 counts prime indices that are prime, nonprime A330944.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], And@@PrimeQ/@#&&And@@PrimeQ/@Length/@Split[#]&]],{n,0,30}]

A109770 Prime(1^2) + prime(2^2) + ... + prime(n^2).

Original entry on oeis.org

2, 9, 32, 85, 182, 333, 560, 871, 1290, 1831, 2492, 3319, 4328, 5521, 6948, 8567, 10446, 12589, 15026, 17767, 20850, 24311, 28114, 32325, 36962, 42013, 47532, 53539, 60020, 67017, 74590, 82751, 91488, 100829, 110760, 121387, 132708, 144757
Offset: 1

Views

Author

Jonathan Vos Post, Aug 13 2005

Keywords

Examples

			a(1) = 2 = prime(1^2).
a(2) = 9 = 2 + 7 = prime(1^2) + prime(2^2).
a(3) = 32 = 2 + 7 + 23 = prime(1^2) + prime(2^2) + prime(3^2).
a(4) = 32 = 2 + 7 + 23 + 53 = prime(1^2) + prime(2^2) + prime(3^2) prime(4^2).
a(x) = 2+7+23+53+97+151+227+311+419+541+661+827+1009+1193+1427+1619+1879+2143+2437+2741+3083+3461+3803+4211+4637+5051+5519+6007+6481+6997+7573+8161+8737+9341+9931+10627+11321+12049+12743+13499+14327 = 185326.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Prime[Range[40]^2]] (* Harvey P. Dale, May 31 2014 *)

Formula

Cumulative sum of A011757.

A109791 a(n) = prime(n^4).

Original entry on oeis.org

2, 53, 419, 1619, 4637, 10627, 21391, 38873, 65687, 104729, 159521, 233879, 331943, 459341, 620201, 821641, 1069603, 1370099, 1731659, 2160553, 2667983, 3260137, 3948809, 4742977, 5653807, 6691987, 7867547, 9195889, 10688173, 12358069
Offset: 1

Views

Author

Jonathan Vos Post, Aug 14 2005

Keywords

Comments

Since the prime number theorem is the statement that prime[n] ~ n * log n as n -> infinity [Hardy and Wright, page 10] we have a(n) = prime(n^4) is asymptotically (n^4)*log(n^4) = 4*(n^4)*log(n).

Examples

			a(1) = prime(1^4) = 2,
a(2) = prime(2^4) = 53,
a(3) = prime(3^4) = 419, etc.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 2.

Crossrefs

Programs

Formula

a(n) = A000040(A000583(n)) for n > 0.

A323526 One and prime numbers whose prime index is a perfect square.

Original entry on oeis.org

1, 2, 7, 23, 53, 97, 151, 227, 311, 419, 541, 661, 827, 1009, 1193, 1427, 1619, 1879, 2143, 2437, 2741, 3083, 3461, 3803, 4211, 4637, 5051, 5519, 6007, 6481, 6997, 7573, 8161, 8737, 9341, 9931, 10627, 11321, 12049, 12743, 13499, 14327, 15101, 15877, 16747, 17609
Offset: 1

Views

Author

Gus Wiseman, Jan 17 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Array[Prime[#^2]&,20]
  • PARI
    vector(50, n, if (n==1, 1, prime((n-1)^2))) \\ Michel Marcus, Feb 15 2019

Formula

a(n) = A011757(n-1) for n > 1. - Alois P. Heinz, Jan 17 2019
Showing 1-10 of 37 results. Next