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

A316185 Number of strict integer partitions of the n-th prime into a prime number of prime parts.

Original entry on oeis.org

0, 0, 1, 1, 0, 1, 0, 2, 2, 3, 5, 5, 6, 8, 10, 13, 18, 20, 26, 32, 34, 45, 54, 66, 90, 106, 117, 135, 142, 165, 269, 311, 375, 398, 546, 579, 689, 823, 938, 1107, 1301, 1352, 1790, 1850, 2078, 2153, 2878, 3811, 4241, 4338, 4828, 5495, 5637, 7076, 8000, 9032
Offset: 1

Views

Author

Gus Wiseman, Jun 25 2018

Keywords

Examples

			The a(14) = 8 partitions of 43 into a prime number of distinct prime parts: (41,2), (31,7,5), (29,11,3), (23,17,3), (23,13,7), (19,17,7), (19,13,11), (17,11,7,5,3).
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n=0, 0,
         `if`(isprime(n), n, h(n-1)))
        end:
    b:= proc(n, i, c) option remember; `if`(n=0,
          `if`(isprime(c), 1, 0), `if`(i<2, 0, b(n, h(i-1), c)+
          `if`(i>n, 0, b(n-i, h(min(n-i, i-1)), c+1))))
        end:
    a:= n-> b(ithprime(n)$2, 0):
    seq(a(n), n=1..56);  # Alois P. Heinz, May 26 2021
  • Mathematica
    Table[Length[Select[IntegerPartitions[Prime[n]],And[UnsameQ@@#,PrimeQ[Length[#]],And@@PrimeQ/@#]&]],{n,10}]
    (* Second program: *)
    h[n_] := h[n] = If[n == 0, 0, If[PrimeQ[n], n, h[n - 1]]];
    b[n_, i_, c_] := b[n, i, c] = If[n == 0,
         If[PrimeQ[c], 1, 0], If[i < 2, 0, b[n, h[i - 1], c] +
         If[i > n, 0, b[n - i, h[Min[n - i, i - 1]], c + 1]]]];
    a[n_] := b[Prime[n], Prime[n], 0];
    Array[a, 56] (* Jean-François Alcover, Jun 11 2021, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=vector(n, k, prime(k))); my(v=Vec(prod(k=1, n, 1 + x^p[k]*y + O(x*x^p[n])))); vector(n, k, sum(i=1, k, polcoeff(v[1+p[k]], p[i])))} \\ Andrew Howroyd, Jun 26 2018

Formula

a(n) = A045450(A000040(n)).

Extensions

More terms from Alois P. Heinz, Jun 26 2018

A316265 FDH numbers of strict integer partitions with prime parts.

Original entry on oeis.org

1, 3, 4, 7, 11, 12, 19, 21, 25, 28, 33, 41, 44, 47, 57, 61, 75, 76, 77, 83, 84, 97, 100, 121, 123, 132, 133, 139, 141, 151, 164, 169, 175, 183, 188, 197, 209, 228, 231, 233, 241, 244, 249, 271, 275, 287, 289, 291, 300, 307, 308, 329, 332, 347, 361, 363, 388
Offset: 1

Views

Author

Gus Wiseman, Jun 28 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. The FDH number of a strict integer partition (y_1,...,y_k) is f(y_1)*...*f(y_k).

Examples

			Sequence of strict integer partitions with prime parts, preceded by their FDH numbers, begins:
   1: ()
   3: (2)
   4: (3)
   7: (5)
  11: (7)
  12: (3,2)
  19: (11)
  21: (5,2)
  25: (13)
  28: (5,3)
  33: (7,2)
  41: (17)
  44: (7,3)
  47: (19)
  57: (11,2)
  61: (23)
  75: (13,2)
  76: (11,3)
  77: (7,5)
  83: (29)
  84: (5,3,2)
		

Crossrefs

Programs

  • Mathematica
    nn=100;
    FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Select[Range[nn],And@@PrimeQ/@(FDfactor[#]/.FDrules)&]

A316266 FDH numbers of strict integer partitions with prime parts and prime length.

Original entry on oeis.org

12, 21, 28, 33, 44, 57, 75, 76, 77, 84, 100, 123, 132, 133, 141, 164, 175, 183, 188, 209, 228, 231, 244, 249, 275, 287, 291, 300, 308, 329, 332, 363, 388, 399, 417, 427, 451, 453, 475, 484, 492, 507, 517, 525, 532, 556, 564, 581, 591, 604, 627, 671, 676, 679
Offset: 1

Views

Author

Gus Wiseman, Jun 28 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. The FDH number of a strict integer partition (y_1,...,y_k) is f(y_1)*...*f(y_k).

Examples

			Sequence of strict integer partitions with prime parts and prime length, preceded by their FDH numbers, begins:
  12: (3,2)
  21: (5,2)
  28: (5,3)
  33: (7,2)
  44: (7,3)
  57: (11,2)
  75: (13,2)
  76: (11,3)
  77: (7,5)
  84: (5,3,2)
		

Crossrefs

Programs

  • Mathematica
    nn=1000;
    FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Select[Range[nn],And[PrimeQ[Length[FDfactor[#]]],And@@PrimeQ/@(FDfactor[#]/.FDrules)]&]

A316267 FDH numbers of strict integer partitions of prime numbers with a prime number of prime parts.

Original entry on oeis.org

12, 21, 57, 123, 249, 417, 532, 699, 867, 1100, 1389, 1463, 1509, 1708, 2049, 2068, 2307, 2324, 2913, 3116, 3147, 3157, 3273, 3325, 3619, 3903, 4227, 4268, 4636, 4821, 5079, 5225, 5324, 5516, 5739, 6308, 6391, 6524, 6621, 6644, 7469, 8092, 8193, 8225, 8457
Offset: 1

Views

Author

Gus Wiseman, Jun 28 2018

Keywords

Comments

Let f(n) = A050376(n) be the n-th Fermi-Dirac prime. The FDH number of a strict integer partition (y_1,...,y_k) is f(y_1)*...*f(y_k).

Examples

			Sequence of strict integer partitions of prime numbers with a prime number of prime parts, preceded by their FDH numbers, begins:
    12: (3,2)
    21: (5,2)
    57: (11,2)
   123: (17,2)
   249: (29,2)
   417: (41,2)
   532: (11,5,3)
   699: (59,2)
   867: (71,2)
  1100: (13,7,3)
  1389: (101,2)
  1463: (11,7,5)
  1509: (107,2)
  1708: (23,5,3)
		

Crossrefs

Programs

  • Mathematica
    nn=1000;
    FDfactor[n_]:=If[n==1,{},Sort[Join@@Cases[FactorInteger[n],{p_,k_}:>Power[p,Cases[Position[IntegerDigits[k,2]//Reverse,1],{m_}->2^(m-1)]]]]];
    FDprimeList=Array[FDfactor,nn,1,Union];FDrules=MapIndexed[(#1->#2[[1]])&,FDprimeList];
    Select[Range[nn],And[PrimeQ[Total[FDfactor[#]/.FDrules]],PrimeQ[Length[FDfactor[#]]],And@@PrimeQ/@(FDfactor[#]/.FDrules)]&]

A357352 Number of partitions of n into distinct positive triangular numbers such that the number of parts is a triangular number.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 25 2022

Keywords

Examples

			a(56) = 2 because we have [45,10,1] and [21,15,10,6,3,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; (h-> `if`(n=0,
         `if`(issqr(8*t+1), 1, 0), `if`(n>i*(i+1)*(i+2)/6, 0,
         `if`(h>n, 0, b(n-h, i-1, t+1))+b(n, i-1, t))))(i*(i+1)/2)
        end:
    a:= n-> b(n, floor((sqrt(1+8*n)-1)/2), 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Sep 25 2022
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = With[{h = i(i+1)/2}, If[n == 0, If[IntegerQ@ Sqrt[8t+1], 1, 0], If[n > i(i+1)(i+2)/6, 0, If[h > n, 0, b[n-h, i-1, t+1]] + b[n, i-1, t]]]];
    a[n_] := b[n, Floor[(Sqrt[8n+1]-1)/2], 0];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 22 2025, after Alois P. Heinz *)

A357354 Number of partitions of n into distinct positive squares such that the number of parts is a square.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 25 2022

Keywords

Examples

			a(30) = 1 because we have [16,9,4,1].
a(78) = 3: [36,25,16,1], [49,16,9,4], [64,9,4,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0,
         `if`(issqr(t), 1, 0), `if`(n>i*(i+1)*(2*i+1)/6, 0,
         `if`(i^2>n, 0, b(n-i^2, i-1, t+1))+b(n, i-1, t)))
        end:
    a:= n-> b(n, isqrt(n), 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Sep 25 2022
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0,
       If[IntegerQ @ Sqrt[t], 1, 0], If[n > i*(i+1)*(2*i+1)/6, 0,
       If[i^2 > n, 0, b[n-i^2, i-1, t+1]] + b[n, i-1, t]]];
    a[n_] := b[n, Floor @ Sqrt[n], 0];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 24 2025, after Alois P. Heinz *)

A339434 Number of compositions (ordered partitions) of n into a prime number of distinct prime parts.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 2, 2, 2, 8, 0, 8, 2, 8, 8, 10, 0, 16, 8, 16, 14, 16, 12, 18, 14, 22, 18, 136, 18, 138, 26, 22, 26, 258, 30, 266, 30, 266, 158, 492, 36, 506, 158, 510, 278, 744, 174, 748, 290, 758, 528, 990, 306, 1228, 668, 1116, 780, 6384, 678, 6630, 800, 1720, 1274
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(10) = 8 because we have [7, 3], [3, 7], [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 5].
		

Crossrefs

Programs

  • Maple
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0,
             b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
        end:
    a:= n-> b(n, numtheory[pi](n), 0):
    seq(a(n), n=0..70);  # Alois P. Heinz, Dec 04 2020
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n - 1]];
    b[n_, i_, t_] := b[n, i, t] = If[s[i] < n, 0,
         If[n == 0, If[PrimeQ[t], t!, 0], Function[p, If[p > n, 0,
           b[n - p, i - 1, t + 1]]][Prime[i]] + b[n, i - 1, t]]];
    a[n_] := b[n, PrimePi[n], 0];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Mar 01 2022, after Alois P. Heinz *)
Showing 1-7 of 7 results.