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-9 of 9 results.

A034891 Number of different products of partitions of n; number of partitions of n into prime parts (1 included); number of distinct orders of Abelian subgroups of symmetric group S_n.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 11, 14, 18, 23, 29, 36, 45, 55, 67, 81, 98, 117, 140, 166, 196, 231, 271, 317, 369, 429, 496, 573, 660, 758, 869, 993, 1133, 1290, 1465, 1662, 1881, 2125, 2397, 2699, 3035, 3407, 3820, 4276, 4780, 5337, 5951, 6628, 7372, 8191, 9090
Offset: 0

Views

Author

Keywords

Comments

a(n) = length of n-th row in A212721. - Reinhard Zumkeller, Jun 14 2012
Number of partitions of n into noncomposite parts. - Omar E. Pol, Jun 23 2022

Crossrefs

Programs

  • Haskell
    a034891 = length . a212721_row  -- Reinhard Zumkeller, Jun 14 2012
    
  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, (p->
          `if`(i<0, 0, b(n, i-1)+ `if`(p>n, 0,
             b(n-p, i))))(`if`(i<1, 1, ithprime(i))))
        end:
    a:= n-> b(n, numtheory[pi](n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 15 2013
  • Mathematica
    Table[ Length[ Union[ Apply[ Times, Partitions[ n], 1]]], {n, 30}]
    CoefficientList[ Series[ (1/(1 - x)) Product[1/(1 - x^Prime[i]), {i, 100}], {x, 0, 50}], x] (* Robert G. Wilson v, Aug 17 2013 *)
    b[n_, i_] := b[n, i] = Module[{p}, p = If[i<1, 1, Prime[i]]; If[n == 0, 1, If[i<0, 0, b[n, i-1] + If[p>n, 0, b[n-p, i]]]]]; a[n_] := b[n, PrimePi[n] ]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 05 2015, after Alois P. Heinz *)
  • Sage
    [Partitions(n, parts_in=(prime_range(n+1)+[1])).cardinality() for n in xsrange(1000)] # Giuseppe Coppoletta, Jul 11 2016

Formula

G.f.: (1/(1-x))*(1/Product_{k>0} (1-x^prime(k))). a(n) = (1/n)*Sum_{k=1..n} A074372(k)*a(n-k). Partial sums of A000607. - Vladeta Jovovic, Sep 19 2002
a(n) = A000041(n) - A353188(n). - Omar E. Pol, Jun 23 2022

Extensions

More terms from Vladeta Jovovic
a(0)=1 from Michael Somos, Feb 05 2011

A190427 a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(golden ratio,2,1) and []=floor.

Original entry on oeis.org

1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2, 1, 1, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 1, 1, 2, 1, 0, 2, 1, 2
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n) = [(b*n+c)*r] - b*[n*r] - [c*r]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427 - A190430
(golden ratio,3,0): A140397 - A190400
(golden ratio,3,1): A140431 - A190435
(golden ratio,3,2): A140436 - A190439

Examples

			a(1)=[3r]-2[r]-1=4-3-1=1.
a(2)=[5r]-2[2r]-1=8-6-1=1.
a(3)=[7r]-2[3r]-1=11-8-1=2.
		

Crossrefs

Programs

  • Magma
    [Floor((2*n+1)*(1+Sqrt(5))/2) - 2*Floor(n*(1+Sqrt(5))/2) - 1: n in [1..100]]; // G. C. Greubel, Apr 06 2018
  • Mathematica
    r = GoldenRatio; b = 2; c = 1;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}] (* A190427 *)
    Flatten[Position[t, 0]] (* A190428 *)
    Flatten[Position[t, 1]] (* A190429 *)
    Flatten[Position[t, 2]] (* A190430 *)
    Table[Floor[(2*n+1)*GoldenRatio] - 2*Floor[n*GoldenRatio] -1, {n,1,100}] (* G. C. Greubel, Apr 06 2018 *)
  • PARI
    for(n=1,100, print1(floor((2*n+1)*(1+sqrt(5))/2) - 2*floor(n*(1+sqrt(5))/2) - 1, ", ")) \\ G. C. Greubel, Apr 06 2018
    
  • Python
    from mpmath import mp, phi
    from sympy import floor
    mp.dps=100
    def a(n): return floor((2*n + 1)*phi) - 2*floor(n*phi) - 1
    print([a(n) for n in range(1, 132)]) # Indranil Ghosh, Jul 02 2017
    

Formula

a(n) = [(2*n+1)*r] - 2*[n*r] - 1, where r=(1+sqrt(5))/2.

A190440 [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,0) and []=floor.

Original entry on oeis.org

2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio;
    f[n_] := Floor[4*n*r] - 4*Floor[n*r];
    t = Table[f[n], {n, 1, 320}] (* A190440 *)
    Flatten[Position[t, 0]]  (* A190240 *)
    Flatten[Position[t, 1]]  (* A190249 *)
    Flatten[Position[t, 2]]  (* A190442 *)
    Flatten[Position[t, 3]]  (* A190443 *)
    Flatten[Position[t, 4]]  (* A190248 *)

Formula

a(n)=[4nr]-4[nr], where r=golden ratio.

A190431 a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(golden ratio,3,1) and []=floor.

Original entry on oeis.org

2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 3, 2, 1, 3, 1, 0, 2, 1, 3, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 3, 2, 1, 3, 1, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n) = [(b*n+c)*r] - b*[n*r] - [c*r]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427 - A190430
(golden ratio,3,0): A140397 - A190400
(golden ratio,3,1): A140431 - A190435
(golden ratio,3,2): A140436 - A190439

Crossrefs

Programs

  • Magma
    [Floor((3*n+1)*(1+Sqrt(5))/2) - 3*Floor(n*(1+Sqrt(5))/2) - 1: n in [1..100]]; // G. C. Greubel, Apr 06 2018
  • Mathematica
    r = GoldenRatio; b = 3; c = 1;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}] (* A190431 *)
    Flatten[Position[t, 0]] (* A190432 *)
    Flatten[Position[t, 1]] (* A190433 *)
    Flatten[Position[t, 2]] (* A190434 *)
    Flatten[Position[t, 3]] (* A190435 *)
  • PARI
    for(n=1,100, print1(floor((3*n+1)*(1+sqrt(5))/2) - 3*floor(n*(1+sqrt(5))/2) - 1, ", ")) \\ G. C. Greubel, Apr 06 2018
    

Formula

a(n) = floor((3*n+1)*(1+sqrt(5))/2) - 3*floor(n*(1+sqrt(5))/2) - 1. - G. C. Greubel, Apr 06 2018

A190436 a(n) = [(b*n+c)*r] - b*[n*r] - [c*r], where (r,b,c)=(golden ratio,3,2) and []=floor.

Original entry on oeis.org

2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 0, 2, 0, 2, 1, 0, 2, 1, 3, 1, 0, 2, 1, 0, 2, 1, 2, 1, 0, 2, 1, 3, 2, 0, 2, 1, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427 - A190430
(golden ratio,3,0): A140397 - A190400
(golden ratio,3,1): A140431 - A190435
(golden ratio,3,2): A140436 - A190439
(golden ratio,4,c): A140440 - A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 3; c = 2;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]] (* A190437 *)
    Flatten[Position[t, 1]] (* A190438 *)
    Flatten[Position[t, 2]] (* A190439 *)
    Flatten[Position[t, 3]] (* A302253 *)

A190445 [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,1) and []=floor.

Original entry on oeis.org

3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439
(golden ratio,4,c): A190440-A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 4; c = 1;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]]
    Flatten[Position[t, 1]]
    Flatten[Position[t, 2]]
    Flatten[Position[t, 3]]
    Flatten[Position[t, 4]]

A190457 a(n) = [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,3) and []=floor.

Original entry on oeis.org

3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 4, 2, 1, 3, 2, 4, 3, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 4, 3
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439
(golden ratio,4,c): A190440-A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 4; c = 3;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]]
    Flatten[Position[t, 1]]
    Flatten[Position[t, 2]]
    Flatten[Position[t, 3]]
    Flatten[Position[t, 4]]

A302253 Positions of 3 in A190436.

Original entry on oeis.org

8, 21, 29, 42, 55, 63, 76, 97, 110, 118, 131, 144, 152, 165, 186, 199, 207, 220, 241, 254, 262, 275, 288, 296, 309, 330, 343, 351, 364, 377, 385, 398, 406, 419, 432, 440, 453, 474, 487, 495, 508, 521, 529, 542, 563, 576, 584, 597, 618, 631, 639, 652, 665, 673, 686, 707, 720, 728
Offset: 1

Views

Author

G. C. Greubel, Apr 04 2018

Keywords

Comments

Write a(n) = [(bn+c)r] - b[nr] - [cr]. If r>0 and b and c are integers satisfying b >= 2 and 0 <= c <= b-1, then 0 <= a(n) <= b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439
(golden ratio,4,c): A140440-A190461

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 3; c = 2;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 500}] (* A190436 *)
    Flatten[Position[t, 0]] (* A190437 *)
    Flatten[Position[t, 1]] (* A190438 *)
    Flatten[Position[t, 2]] (* A190439 *)
    Flatten[Position[t, 3]] (* A302253 *)

A190451 [(bn+c)r]-b[nr]-[cr], where (r,b,c)=(golden ratio,4,2) and []=floor.

Original entry on oeis.org

2, 1, 3, 2, 0, 3, 1, 4, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 2, 1, 3, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 0, 3, 1, 0, 2, 1, 3, 2, 0, 3, 1, 4, 2, 1, 3, 2, 0, 3, 1, 3, 2, 0, 3, 1, 0
Offset: 1

Views

Author

Clark Kimberling, May 10 2011

Keywords

Comments

Write a(n)=[(bn+c)r]-b[nr]-[cr]. If r>0 and b and c are integers satisfying b>=2 and 0<=c<=b-1, then 0<=a(n)<=b. The positions of 0 in the sequence a are of interest, as are the position sequences for 1,2,...,b. These b+1 position sequences comprise a partition of the positive integers.
Examples:
(golden ratio,2,0): A078588, A005653, A005652
(golden ratio,2,1): A190427-A190430
(golden ratio,3,0): A140397-A190400
(golden ratio,3,1): A140431-A190435
(golden ratio,3,2): A140436-A190439

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; b = 4; c = 2;
    f[n_] := Floor[(b*n + c)*r] - b*Floor[n*r] - Floor[c*r];
    t = Table[f[n], {n, 1, 320}]
    Flatten[Position[t, 0]]
    Flatten[Position[t, 1]]
    Flatten[Position[t, 2]]
    Flatten[Position[t, 3]]
    Flatten[Position[t, 4]]
Showing 1-9 of 9 results.