A051898 Erroneous version of A002095.
1, 1, 1, 1, 1, 2, 3, 4, 4, 5, 6
Offset: 1
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.
a096258 = p a018252_list where p _ 0 = 1 p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m -- Reinhard Zumkeller, Jan 15 2012
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+ `if`(i>n or isprime(i), 0, b(n-i, i-1)))) end: a:= n-> b(n$2): seq(a(n), n=0..70); # Alois P. Heinz, May 29 2013
CoefficientList[ Series[ Product[(1 + x^n)/(1 + x^Prime[n]), {n, 70}], {x, 0, 67}], x] (* Robert G. Wilson v, Aug 02 2004 *)
a(12) = 4 because 12 = 4 + 4 + 4 = 6 + 6 = 4 + 8 = 12 (itself a composite number).
a023895 = p a002808_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, Jan 15 2012
g:=(1-x)*product((1-x^ithprime(j))/(1-x^j),j=1..80): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=0..62); # Emeric Deutsch, Apr 03 2006 # second Maple program: b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0, b(n, i-1)+ `if`(i>n or isprime(i), 0, b(n-i, i)))) end: a:= n-> b(n$2): seq(a(n), n=0..70); # Alois P. Heinz, May 29 2013
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n + PrimePi[n] + 1]; CoefficientList[ Series[1/Product[1 - x^Composite[i], {i, 1, 50}], {x, 0, 75}], x] (* Second program: *) b[n_, i_] := b[n, i] = If[n==0, 1, If[i<2, 0, b[n, i-1] + If[i>n || PrimeQ[i], 0, b[n-i, i]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)
a(12) = #{6 + 6, 4 + 4 + 4} = #{2 * (2*3), 3 * (2*2)} = 2.
a101048 = p a001358_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, Mar 21 2014
g:=1/product(product(1-x^(ithprime(i)*ithprime(j)),i=1..j),j=1..30): gser:=series(g,x=0,75): seq(coeff(gser,x,n),n=1..71); # Emeric Deutsch, Apr 04 2006 # second Maple program: h:= proc(n) option remember; `if`(n=0, 0, `if`(numtheory[bigomega](n)=2, n, h(n-1))) end: b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, `if`(i>n, 0, b(n-i, h(min(n-i, i))))+b(n, h(i-1)))) end: a:= n-> b(n, h(n)): seq(a(n), n=0..100); # Alois P. Heinz, May 19 2021
terms = 100; CoefficientList[1/Product[1 - x^(Prime[i] Prime[j]), {i, 1, PrimePi[Ceiling[terms/2]]}, {j, 1, i}] + O[x]^terms, x] (* Jean-François Alcover, Aug 01 2018 *)
issemi(n)=if(n<4, return(0)); forprime(p=2,97, if(n%p==0, return(isprime(n/p)))); bigomega(n)==2 allsemi(v)=for(i=1,#v, if(!issemi(v[i]), return(0))); 1 a(n)=my(s); if(n<4, return(n==0)); forpart(k=n, if(allsemi(k), s++),[4,n]); s \\ Charles R Greathouse IV, Jan 20 2023
a(6) = 5 because 1+1+1+1+1+1 = 1+1+4 = 1+4+1 = 4+1+1 = 6.
a:= proc(n) option remember; `if`(n=0, 1, add( `if`(isprime(j), 0, a(n-j)), j=1..n)) end: seq(a(n), n=0..45); # Alois P. Heinz, Aug 06 2019
nn=50; np=Select[Range[nn], !PrimeQ[ # ] &]; CoefficientList[Series[1/(1-Sum[x^k, {k, np}]), {x, 0, nn}], x] (* T. D. Noe, Aug 20 2010 *)
The a(10) = 2 through a(15) = 10 partitions: (8,2) (11) (9,3) (13) (9,5) (8,7) (9,1) (6,5) (10,2) (7,6) (12,2) (10,5) (7,4) (6,4,2) (8,5) (8,4,2) (11,4) (8,3) (10,3) (9,4,1) (12,3) (9,2) (12,1) (14,1) (10,1) (6,4,3) (6,5,4) (6,4,1) (8,4,1) (8,4,3) (8,6,1) (9,4,2) (10,4,1)
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Count[#,_?(#==1||PrimeQ[#]&)]==1&]],{n,0,30}]
seq(n)={Vec(sum(k=1, n, if(isprime(k) || k==1, x^k)) * prod(k=4, n, 1 + if(!isprime(k), x^k), 1 + O(x^n)), -n-1)} \\ Andrew Howroyd, Dec 28 2024
The prime indices of 70 are {1,3,4}, so 70 is in the sequence. The prime indices of 98 are {1,4,4}, so 98 is not in the sequence.
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; Select[Range[100],Length[Select[prix[#],CompositeQ]]==1&]
The a(2) = 1 through a(9) = 9 partitions: (2) (3) (31) (5) (42) (7) (62) (54) (21) (211) (311) (51) (43) (71) (63) (2111) (3111) (421) (431) (621) (21111) (511) (4211) (711) (31111) (5111) (4311) (211111) (311111) (42111) (2111111) (51111) (3111111) (21111111)
Table[Length[Select[IntegerPartitions[n],Count[#,_?PrimeQ]==1&]],{n,0,30}]
The a(2) = 1 through a(12) = 8 partitions (A=10, B=11): (2) (3) (31) (5) (42) (7) (62) (54) (82) (B) (93) (21) (51) (43) (71) (63) (541) (65) (A2) (421) (431) (621) (631) (74) (B1) (83) (642) (92) (651) (821) (741) (831) (921)
Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Count[#,_?PrimeQ]==1&]],{n,0,30}]
The a(1) = 1 through a(11) = 5 partitions: (1) (2) (3) . (5) (6) (7) . (5,4) (10) (11) (4,1) (4,2) (4,3) (8,1) (6,4) (7,4) (4,4,1) (8,2) (8,3) (9,1) (9,2) (4,4,2) (4,4,3)
Table[Length[Select[IntegerPartitions[n],Count[#,_?SquareFreeQ]==1&]],{n,0,30}]
Comments