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 26 results. Next

A325129 Heinz numbers of integer partitions into nonsquares (A087153).

Original entry on oeis.org

1, 3, 5, 9, 11, 13, 15, 17, 19, 25, 27, 29, 31, 33, 37, 39, 41, 43, 45, 47, 51, 55, 57, 59, 61, 65, 67, 71, 73, 75, 79, 81, 83, 85, 87, 89, 93, 95, 99, 101, 103, 107, 109, 111, 113, 117, 121, 123, 125, 127, 129, 131, 135, 137, 139, 141, 143, 145, 149, 153, 155
Offset: 1

Views

Author

Gus Wiseman, Apr 01 2019

Keywords

Comments

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

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   3: {2}
   5: {3}
   9: {2,2}
  11: {5}
  13: {6}
  15: {2,3}
  17: {7}
  19: {8}
  25: {3,3}
  27: {2,2,2}
  29: {10}
  31: {11}
  33: {2,5}
  37: {12}
  39: {2,6}
  41: {13}
  43: {14}
  45: {2,2,3}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],!MemberQ[If[#==1,{},FactorInteger[#]],{p_,_}/;IntegerQ[Sqrt[PrimePi[p]]]]&]

A000037 Numbers that are not squares (or, the nonsquares).

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Offset: 1

Views

Author

Keywords

Comments

Note the remarkable formula for the n-th term (see the FORMULA section)!
These are the natural numbers with an even number of divisors. The number of divisors is odd for the complementary sequence, the squares (sequence A000290) and the numbers for which the number of divisors is divisible by 3 is sequence A059269. - Ola Veshta (olaveshta(AT)my-deja.com), Apr 04 2001
a(n) is the largest integer m not equal to n such that n = (floor(n^2/m) + m)/2. - Alexander R. Povolotsky, Feb 10 2008
Union of A007969 and A007970; A007968(a(n)) > 0. - Reinhard Zumkeller, Jun 18 2011
Terms of even numbered rows in the triangle A199332. - Reinhard Zumkeller, Nov 23 2011
If a(n) and a(n+1) are of the same parity then (a(n)+a(n+1))/2 is a square. - Zak Seidov, Aug 13 2012
Theaetetus of Athens proved the irrationality of the square roots of these numbers in the 4th century BC. - Charles R Greathouse IV, Apr 18 2013
4*a(n) are the even members of A079896, the discriminants of indefinite binary quadratic forms. - Wolfdieter Lang, Jun 14 2013

Examples

			For example note that the squares 0, 1, 4, 9, 16 are not included.
		

References

  • Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 58-60.
  • 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. A242401 (subsequence).
Cf. A086849 (partial sums), A048395.

Programs

  • Haskell
    a000037 n = n + a000196 (n + a000196 n)
    -- Reinhard Zumkeller, Nov 23 2011
    
  • Magma
    [n : n in [1..1000] | not IsSquare(n) ];
    
  • Magma
    at:=0; for n in [1..10000] do if not IsSquare(n) then at:=at+1; print at, n; end if; end for;
    
  • Maple
    A000037 := n->n+floor(1/2+sqrt(n));
  • Mathematica
    a[n_] := (n + Floor[Sqrt[n + Floor[Sqrt[n]]]]); Table[a[n], {n, 71}] (* Robert G. Wilson v, Sep 24 2004 *)
    With[{upto=100},Complement[Range[upto],Range[Floor[Sqrt[upto]]]^2]] (* Harvey P. Dale, Dec 02 2011 *)
    a[ n_] :=  If[ n < 0, 0, n + Round @ Sqrt @ n]; (* Michael Somos, May 28 2014 *)
  • Maxima
    A000037(n):=n + floor(1/2 + sqrt(n))$ makelist(A000037(n),n,1,50); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    {a(n) = if( n<0, 0, n + (1 + sqrtint(4*n)) \ 2)};
    
  • Python
    from math import isqrt
    def A000037(n): return n+isqrt(n+isqrt(n)) # Chai Wah Wu, Mar 31 2022
    
  • Python
    from math import isqrt
    def A000037(n): return n+(k:=isqrt(n))+int(n>=k*(k+1)+1) # Chai Wah Wu, Jun 17 2024

Formula

a(n) = n + floor(1/2 + sqrt(n)).
a(n) = n + floor(sqrt( n + floor(sqrt n))).
A010052(a(n)) = 0. - Reinhard Zumkeller, Jan 26 2010
A173517(a(n)) = n; a(n)^2 = A030140(n). - Reinhard Zumkeller, Feb 20 2010
a(n) = A000194(n) + n. - Jaroslav Krizek, Jun 14 2009
a(A002061(n)) = a(n^2-n+1) = A002522(n) = n^2 + 1. - Jaroslav Krizek, Jun 21 2009

Extensions

Edited by Charles R Greathouse IV, Oct 30 2009

A276078 Numbers n in whose prime factorization no exponent of any prime(k) exceeds k.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 25, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 55, 57, 58, 59, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 82, 83, 85, 86, 87, 89, 90, 91, 93, 94, 95, 97, 98, 99, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121
Offset: 1

Views

Author

Antti Karttunen, Aug 18 2016

Keywords

Comments

Numbers not divisible by p^(1+A000720(p)) for any prime p, where A000720(p) gives the index of prime p: 1 for 2, 2 for 3, 3 for 5, and so on.
Also Heinz numbers of integer partitions where the multiplicity of i does not exceed i for any i (A052335). Differs from A048103 in lacking {625, 1250, 1875, 3750, 4375, 5625, 6875, 8125, 8750, ...}. - Gus Wiseman, Mar 09 2019
Asymptotic density is Product_{i>=1} 1-prime(i)^(-1-i) = 0.72102334... - Amiram Eldar, Oct 20 2020

Crossrefs

Positions of zeros in A276077.
Complement: A276079.
Sequence A276076 sorted into ascending order.
Subsequence of A048103 from which it differs for the first time at n=451, where a(451) = 626, while A048103(451) = 625, a value missing from here.

Programs

  • Mathematica
    Select[Range@ 121, Or[# == 1, AllTrue[FactorInteger[#], PrimePi[#1] >= #2 & @@ # &]] &] (* Michael De Vlieger, Jun 24 2017 *)
  • PARI
    isok(n) = my(f=factor(n)); for (k=1, #f~, if (f[k, 2] > primepi(f[k, 1]), return(0))); return (1); \\ Michel Marcus, Jun 24 2017
    
  • PARI
    is(n) = {my(t=1);forprime(p = 2, , t++; pp = p^t; if(n%pp==0, return(0)); if(pp > n, return(1)))} \\ David A. Corneth, Jun 24 2017
    
  • PARI
    upto(n) = {my(v = vector(n,i,1), t=1, res=List()); forprime(p=2, , t++; pp = p^t; if(pp>n, break); for(i=1, n\pp, v[pp*i] = 0)); for(i=1, n, if(v[i]==1, listput(res, i))); res} \\ David A. Corneth, Jun 24 2017
  • Python
    from sympy import factorint, primepi
    def ok(n):
        f = factorint(n)
        return all(f[i] <= primepi(i) for i in f)
    print([n for n in range(1, 151) if ok(n)]) # Indranil Ghosh, Jun 24 2017
    

A114640 Number of partitions of n such that the set of parts and the set of multiplicities of parts are equal.

Original entry on oeis.org

1, 1, 0, 0, 2, 1, 1, 0, 1, 1, 3, 2, 3, 3, 5, 0, 4, 5, 2, 3, 8, 6, 5, 10, 9, 9, 16, 14, 12, 16, 17, 10, 17, 15, 16, 19, 35, 17, 34, 37, 40, 31, 54, 36, 60, 61, 58, 63, 88, 58, 88, 87, 91, 84, 115, 93, 116, 108, 115, 130, 190, 143, 165, 214, 219, 200, 255, 240
Offset: 0

Views

Author

Vladeta Jovovic, Feb 18 2006

Keywords

Comments

The Heinz numbers of these partitions are given by A109297. - Gus Wiseman, Apr 02 2019

Examples

			From _Gus Wiseman_, Apr 02 2019: (Start)
The initial terms count the following integer partitions:
   0: ()
   1: (1)
   4: (22)
   4: (211)
   5: (221)
   6: (3111)
   8: (41111)
   9: (333)
  10: (511111)
  10: (3331)
  10: (322111)
  11: (332111)
  11: (322211)
  12: (6111111)
  12: (4221111)
  12: (33222)
  13: (33322)
  13: (333211)
  13: (332221)
  14: (71111111)
  14: (52211111)
  14: (4421111)
  14: (4222211)
  14: (333221)
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Union[#]==Union[Length/@Split[#]]&]],{n,0,30}] (* Gus Wiseman, Apr 02 2019 *)

Extensions

More terms from Alois P. Heinz, Aug 09 2016

A114639 Number of partitions of n such that the set of parts and the set of multiplicities of parts are disjoint.

Original entry on oeis.org

1, 0, 2, 2, 2, 3, 5, 4, 7, 7, 13, 16, 19, 23, 33, 34, 44, 58, 63, 80, 101, 112, 139, 171, 196, 234, 288, 328, 394, 478, 545, 658, 777, 881, 1050, 1236, 1414, 1666, 1936, 2216, 2592, 3018, 3428, 3992, 4604, 5243, 6069, 6986, 7951, 9139, 10447, 11892, 13625
Offset: 0

Views

Author

Vladeta Jovovic, Feb 18 2006

Keywords

Comments

The Heinz numbers of these partitions are given by A325131. - Gus Wiseman, Apr 02 2019

Examples

			From _Gus Wiseman_, Apr 02 2019: (Start)
The a(2) = 2 through a(9) = 7 partitions:
  (2)   (3)    (4)     (5)      (6)       (7)        (8)         (9)
  (11)  (111)  (1111)  (32)     (33)      (43)       (44)        (54)
                       (11111)  (42)      (52)       (53)        (63)
                                (222)     (1111111)  (62)        (72)
                                (111111)             (2222)      (432)
                                                     (3311)      (222111)
                                                     (11111111)  (111111111)
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p, m) option remember; `if`(n=0, 1,
          `if`(i<1, 0, b(n, i-1, p, select(x-> x x<=n-i*j, p union {i}),
             select(x-> x b(n$2, {}$2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Aug 09 2016
  • Mathematica
    b[n_, i_, p_, m_] := b[n, i, p, m] = If[n == 0, 1, If[i<1, 0, b[n, i-1, p, Select[m, #Jean-François Alcover, Feb 05 2017, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Intersection[#,Length/@Split[#]]=={}&]],{n,0,30}] (* Gus Wiseman, Apr 02 2019 *)

Extensions

a(0)=1 prepended and more terms from Alois P. Heinz, Aug 09 2016

A052335 Number of partitions of n into at most 1 copy of 1, 2 copies of 2, 3 copies of 3, ... .

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 7, 10, 13, 17, 22, 28, 36, 46, 58, 73, 91, 114, 141, 173, 213, 261, 318, 387, 469, 567, 683, 821, 984, 1176, 1403, 1671, 1984, 2351, 2781, 3284, 3869, 4550, 5343, 6264, 7330, 8565, 9993, 11642, 13543, 15733, 18252, 21148, 24471, 28282, 32646, 37640, 43348, 49867, 57302, 65776, 75426, 86405, 98882
Offset: 0

Views

Author

Christian G. Bower, Dec 19 1999

Keywords

Comments

Also number of partitions into non-pronic numbers (cannot be written as i*(i+1)).
Convolution of A024940 and A225044. - Vaclav Kotesovec, Jan 02 2017

Examples

			a(5)=4 because we have [5], [4,1], [3,2] and [2,2,1] ([3,1,1], [2,1,1,1] and [1,1,1,1,1] do not qualify).
		

Crossrefs

Programs

  • Maple
    g:=product((1-x^(j*(j+1)))/(1-x^j),j=1..53): gser:=series(g,x=0,55): seq(coeff(gser,x,n),n=0..49); # Emeric Deutsch, Mar 04 2006
    # second Maple program:
    with(numtheory):
    a:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(issqr(4*d+1), 0, d), d=divisors(j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 01 2014
  • Mathematica
    CoefficientList[Series[Product[Sum[x^(i j ), {i, 0, j}], {j, 1, 49}], {x, 0, 49}], x]
    (* Second program: *)
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[If[IntegerQ @ Sqrt[4*d+1], 0, d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 80}] (* Jean-François Alcover, Jan 30 2017, after Alois P. Heinz *)
  • PARI
    N=66; q='q+O('q^N); Vec( prod(n=1,N, sum(k=0,n,q^(k*n)) ) ) \\ Joerg Arndt, Apr 01 2014

Formula

G.f.: Product_{i>=1} (1-x^(i*(i+1)))/(1-x^i).
G.f.: (1+x) * (1+x^2+x^4) * (1+x^3+x^6+x^9) * (1+x^4+x^8+x^12+x^16) * ... (g.f. above, expanded). - Joerg Arndt, Apr 01 2014
G.f.: Product_{n>=1} (1 - q^(n*(n+1))) / Product_{n>=1} (1 - q^n). - Joerg Arndt, Apr 01 2014
a(n) = p(n,1,1) with p(n,t,k) = if t<0 then 0 else if k<=n then p(n-k,t-1,k)+p(n,k+1,k+1) else 0^n. - Reinhard Zumkeller, Jan 20 2010
a(n) ~ exp(Pi*sqrt(2*n/3) - 3^(1/4) * Zeta(3/2) * n^(1/4) / 2^(3/4) - 3*Zeta(3/2)^2/(32*Pi)) / sqrt(2*n). - Vaclav Kotesovec, Jan 01 2017

A276429 Number of partitions of n containing no part i of multiplicity i.

Original entry on oeis.org

1, 0, 2, 2, 3, 5, 8, 9, 16, 19, 29, 36, 53, 65, 92, 115, 154, 195, 257, 318, 419, 516, 663, 821, 1039, 1277, 1606, 1963, 2441, 2978, 3675, 4454, 5469, 6603, 8043, 9688, 11732, 14066, 16963, 20260, 24310, 28953, 34586, 41047, 48857, 57802, 68528, 80862, 95534, 112388, 132391
Offset: 0

Views

Author

Emeric Deutsch, Sep 19 2016

Keywords

Comments

The Heinz numbers of these partitions are given by A325130. - Gus Wiseman, Apr 02 2019

Examples

			a(4) = 3 because we have [1,1,1,1], [1,1,2], and [4]; the partitions [1,3], [2,2] do not qualify.
From _Gus Wiseman_, Apr 02 2019: (Start)
The a(2) = 2 through a(7) = 9 partitions:
  (2)   (3)    (4)     (5)      (6)       (7)
  (11)  (111)  (211)   (32)     (33)      (43)
               (1111)  (311)    (42)      (52)
                       (2111)   (222)     (511)
                       (11111)  (411)     (3211)
                                (3111)    (4111)
                                (21111)   (31111)
                                (111111)  (211111)
                                          (1111111)
(End)
		

Crossrefs

Programs

  • Maple
    g := product(1/(1-x^i)-x^(i^2), i = 1 .. 100): gser := series(g, x = 0, 53): seq(coeff(gser, x, n), n = 0 .. 50);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          add(`if`(i=j, 0, b(n-i*j, i-1)), j=0..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..60);  # Alois P. Heinz, Sep 19 2016
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[If[i == j, x, 1]*b[n - i*j, i - 1], {j, 0, n/i}]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n]]; Table[T[n][[1]], {n, 0, 60}] (* Jean-François Alcover, Nov 28 2016 after Alois P. Heinz's Maple code for A276427 *)
    Table[Length[Select[IntegerPartitions[n],And@@Table[Count[#,i]!=i,{i,Union[#]}]&]],{n,0,30}] (* Gus Wiseman, Apr 02 2019 *)

Formula

a(n) = A276427(n,0).
G.f.: g(x) = Product_{i>=1} (1/(1-x^i) - x^{i^2}).

A115584 Number of partitions of n in which each part k occurs more than k times.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 1, 3, 2, 4, 3, 6, 4, 7, 7, 8, 8, 12, 9, 15, 14, 17, 18, 24, 21, 29, 29, 35, 35, 46, 42, 56, 54, 65, 67, 81, 77, 98, 95, 115, 114, 139, 135, 164, 165, 190, 195, 230, 225, 272, 271, 313, 321, 370, 374, 433, 441, 501, 514, 589, 592, 681, 698, 778, 809, 907
Offset: 0

Views

Author

Vladeta Jovovic, Mar 09 2006

Keywords

Comments

The Heinz numbers of these partitions are given by A325127. - Gus Wiseman, Apr 02 2019

Examples

			a(2) = 1 because we have [1,1]; a(10) = 4 because we have [2,2,2,2,2], [2,2,2,2,1,1], [2,2,2,1,1,1,1] and [1^10].
From _Gus Wiseman_, Apr 02 2019: (Start)
The initial terms count the following integer partitions:
   0: ()
   2: (11)
   3: (111)
   4: (1111)
   5: (11111)
   6: (222)
   6: (111111)
   7: (1111111)
   8: (2222)
   8: (22211)
   8: (11111111)
   9: (222111)
   9: (111111111)
  10: (22222)
  10: (222211)
  10: (2221111)
  10: (1111111111)
  11: (2222111)
  11: (22211111)
  11: (11111111111)
  12: (3333)
  12: (222222)
  12: (2222211)
  12: (22221111)
  12: (222111111)
  12: (111111111111)
(End)
		

Crossrefs

Programs

  • Maple
    g:=product((1-x^k+x^(k*(k+1)))/(1-x^k),k=1..30): gser:=series(g,x=0,75): seq(coeff(gser,x,n),n=0..70); # Emeric Deutsch, Mar 12 2006
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1) +add(b(n-i*j, i-1), j=i+1..n/i)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..80);  # Alois P. Heinz, Feb 09 2017
  • Mathematica
    CoefficientList[ Series[ Product[(1 - x^k + x^(k(k + 1)))/(1 - x^k), {k, 14}], {x, 0, 66}], x] (* Robert G. Wilson v, Mar 12 2006 *)
    Table[Length[Select[IntegerPartitions[n],And@@Table[Count[#,i]>i,{i,Union[#]}]&]],{n,0,30}] (* Gus Wiseman, Apr 02 2019 *)

Formula

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

Extensions

More terms from Robert G. Wilson v and Emeric Deutsch, Mar 12 2006

A325128 Numbers in whose prime factorization the exponent of prime(k) is less than k for all prime indices k.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 25, 29, 31, 33, 35, 37, 39, 41, 43, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 75, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 119, 121, 123, 127, 129, 131, 133, 137, 139, 141
Offset: 1

Views

Author

Gus Wiseman, Apr 01 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are Heinz numbers of integer partitions where each part k appears fewer than k times. Such partitions are counted by A087153.
The asymptotic density of this sequence is Product_{k>=1} (1 - 1/prime(k)^k) = 0.44070243286030291209... - Amiram Eldar, Feb 02 2021

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   3: {2}
   5: {3}
   7: {4}
  11: {5}
  13: {6}
  15: {2,3}
  17: {7}
  19: {8}
  21: {2,4}
  23: {9}
  25: {3,3}
  29: {10}
  31: {11}
  33: {2,5}
  35: {3,4}
  37: {12}
  39: {2,6}
  41: {13}
  43: {14}
  47: {15}
  49: {4,4}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],And@@Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>k
    				

A325130 Numbers in whose prime factorization the exponent of prime(k) is not equal to k for any prime index k.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 37, 39, 40, 41, 43, 44, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 64, 65, 67, 68, 69, 71, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 88, 89, 91, 92, 93, 95, 96
Offset: 1

Views

Author

Gus Wiseman, Apr 01 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so these are Heinz numbers of the integer partitions counted by A276429.
The asymptotic density of this sequence is Product_{k>=1} (1 - 1/prime(k)^k + 1/prime(k)^(k+1)) = 0.68974964705635552968... - Amiram Eldar, Jan 09 2021

Examples

			The sequence of terms together with their prime indices begins:
   1: {}
   3: {2}
   4: {1,1}
   5: {3}
   7: {4}
   8: {1,1,1}
  11: {5}
  12: {1,1,2}
  13: {6}
  15: {2,3}
  16: {1,1,1,1}
  17: {7}
  19: {8}
  20: {1,1,3}
  21: {2,4}
  23: {9}
  24: {1,1,1,2}
  25: {3,3}
  27: {2,2,2}
  28: {1,1,4}
		

Crossrefs

Programs

  • Maple
    q:= n-> andmap(i-> numtheory[pi](i[1])<>i[2], ifactors(n)[2]):
    a:= proc(n) option remember; local k; for k from 1+
         `if`(n=1, 0, a(n-1)) while not q(k) do od; k
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Oct 28 2019
  • Mathematica
    Select[Range[100],And@@Cases[If[#==1,{},FactorInteger[#]],{p_,k_}:>k!=PrimePi[p]]&]
Showing 1-10 of 26 results. Next