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

A317241 Number of representations of n of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Jul 24 2018

Keywords

Examples

			a(25) = 2: 1 + 2 * (1 + 11) = 1 + 3 * (1 + 7) = 25.
a(43) = 3: 1 + 2 * (1 + 5 * (1 + 3)) = 1 + 3 * (1 + 13) = 1 + 7 * (1 + 5) = 43.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=1, 1,
          add(b((n-1)/p, s union {p}), p=numtheory[factorset](n-1) minus s))
        end:
    a:= n-> b(n, {}):
    seq(a(n), n=1..200);
  • Mathematica
    b[n_, s_] := b[n, s] = If[n == 1, 1, Sum[If[p == 1, 0, b[(n - 1)/p, s ~Union~ {p}]], {p, FactorInteger[n - 1][[All, 1]] ~Complement~ s}]];
    a[n_] := b[n, {}];
    Array[a, 200] (* Jean-François Alcover, May 26 2019, after Alois P. Heinz *)

Formula

a(n) = 0 <=> n in { A317242 }.
a(n) <= A317240(n).

A317390 A(n,k) is the n-th positive integer that has exactly k representations of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes; square array A(n,k), n>=1, k>=0, read by antidiagonals.

Original entry on oeis.org

2, 1, 5, 25, 3, 7, 43, 29, 4, 11, 211, 61, 37, 6, 15, 638, 261, 91, 40, 8, 23, 664, 848, 421, 111, 41, 9, 26, 1613, 1956, 921, 426, 121, 49, 10, 27, 2991, 3321, 2058, 969, 441, 124, 51, 12, 28, 7021, 3004, 3336, 2092, 1002, 484, 171, 52, 13, 31, 11306, 7162, 3319, 3368, 2094, 1026, 535, 184, 67, 14, 33
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Examples

			A(6,2) = 49: 1 + 3 * (1 + 5 * (1 + 2)) = 1 + 2 * (1 + 23) = 49.
Square array A(n,k) begins:
   2,  1, 25,  43, 211,  638,  664, 1613, 2991, ...
   5,  3, 29,  61, 261,  848, 1956, 3321, 3004, ...
   7,  4, 37,  91, 421,  921, 2058, 3336, 3319, ...
  11,  6, 40, 111, 426,  969, 2092, 3368, 3554, ...
  15,  8, 41, 121, 441, 1002, 2094, 3741, 3928, ...
  23,  9, 49, 124, 484, 1026, 2283, 3914, 4846, ...
  26, 10, 51, 171, 535, 1106, 2381, 3979, 5552, ...
  27, 12, 52, 184, 540, 1156, 2388, 4082, 5886, ...
  28, 13, 67, 187, 591, 1191, 2432, 4126, 6293, ...
		

Crossrefs

Row n=1 gives A317385.
A(n,n) gives A317537.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=1, 1, add(b((n-1)/p,
          s union {p}) , p=numtheory[factorset](n-1) minus s))
        end:
    A:= proc() local h, p, q; p, q:= proc() [] end, 0;
          proc(n, k)
            while nops(p(k))
    				
  • Mathematica
    b[n_, s_List] := b[n, s] = If[n == 1, 1, Sum[If[p == 1, 0, b[(n - 1)/p, s  ~Union~ {p}]], {p, FactorInteger[n - 1][[All, 1]] ~Complement~ s}]];
    A[n_, k_] := Module[{h, p, q = 0}, p[_] = {}; While[Length[p[k]] < n, q = q + 1; h = b[q, {}]; p[h] = Append[p[h], q]]; p[k][[n]]];
    Table[Table[A[n, d - n], {n, 1, d}], {d, 1, 11}] // Flatten (* Jean-François Alcover, Dec 06 2019, from Maple *)

Formula

A317241(A(n,k)) = k.

A317384 Smallest positive integer that has exactly n representations of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of (not necessarily distinct) primes.

Original entry on oeis.org

2, 1, 13, 31, 43, 91, 111, 231, 175, 274, 351, 471, 703, 526, 463, 931, 823, 1723, 1579, 1279, 1903, 2083, 1791, 2143, 2227, 2443, 2671, 2781, 2335, 3807, 3163, 3631, 3199, 4243, 5314, 5482, 5107, 4671, 6231, 6681, 8863, 7483, 6111, 6331, 7879, 8031, 8023, 9351
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2018

Keywords

Examples

			a(1) = 1: 1.
a(2) = 13: 1 + 2 * (1 + 5) = 1 + 3 * (1 + 3) = 13.
a(3) = 31: 1 + 2 * (1 + 2 * (1 + 2 * (1 + 2))) = 1 + 3 * (1 + 3 * (1 + 2)) = 1 + 5 * (1 + 5) = 31.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, 1,
          add(b((n-1)/p), p=numtheory[factorset](n-1)))
        end:
    a:= proc(n) option remember; local k;
          for k while n<>b(k) do od; k
        end:
    seq(a(n), n=0..50);
  • Mathematica
    pp[n_] := pp[n] = FactorInteger[n][[All, 1]];
    q[n_] := q[n] = Switch[n, 1, True, 2, False, _, AnyTrue[pp[n-1], q[(n-1)/#]&]];
    b[n_] := b[n] = Which[n == 1, 1, ! q[n], 0, True, Sum[b[(n-1)/p], {p, pp[n-1]}]];
    a[n_] := Module[{k}, For[k = 1, True, k++, If[n == b[k], Return[k]]]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 07 2023, after Alois P. Heinz *)

Formula

a(n) = min { j > 0 : A317240(j) = n }.

A317537 The n-th positive integer that has exactly n representations of the form 1 + p1 * (1 + p2* ... * (1 + p_j)...), where [p1, ..., p_j] is a (possibly empty) list of distinct primes.

Original entry on oeis.org

1, 29, 91, 426, 1002, 2283, 3979, 5886, 10861, 17116, 20749, 35106, 44031, 60919, 67453, 108655, 142429, 197107, 232625, 303317, 352093, 432517, 542935, 642520, 839938, 988791, 1050505, 1208559, 1612876, 1753324, 2129203, 2391496, 2735890, 3141916, 3593278
Offset: 1

Views

Author

Alois P. Heinz, Jul 30 2018

Keywords

Examples

			a(1) = 1: 1.
a(2) = 29: 1 + 2 * (1 + 13) = 1 + 7 * (1 + 3) = 29.
a(3) = 91: 1 + 2 * (1 + 11 * (1 + 3)) = 1 + 3 * (1 + 29) = 1 + 5 * (1 + 17) = 91.
		

Crossrefs

A diagonal of A317390.
Cf. A317385.

Formula

a(n) = A317390(n,n).
Showing 1-4 of 4 results.