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

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.

A317240 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 (not necessarily distinct) primes.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Jul 24 2018

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1,
          add(a((n-1)/p), p=numtheory[factorset](n-1)))
        end:
    seq(a(n), n=1..200);
  • 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)/#]&]];
    a[n_] := a[n] = Which[n == 1, 1, !q[n], 0, True, Sum[a[(n-1)/p], {p, pp[n-1]}]];
    Array[a, 105] (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{prime p|(n-1)} a((n-1)/p) for n>1, a(1) = 1.
a(n) = 0 <=> n in { A180337 }.
a(n) >= A317241(n).
G.f. A(x) satisfies: A(x) = x * (1 + A(x^2) + A(x^3) + A(x^5) + ... + A(x^prime(k)) + ...). - Ilya Gutkovskiy, May 09 2019

A317242 Positive integers having no representation 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

2, 5, 7, 11, 15, 23, 26, 27, 28, 31, 33, 35, 36, 47, 50, 56, 57, 63, 66, 78, 81, 82, 95, 96, 106, 116, 119, 120, 122, 129, 136, 156, 162, 166, 167, 190, 193, 215, 218, 219, 227, 236, 244, 254, 263, 286, 289, 330, 335, 342, 352, 359, 387, 393, 395, 396, 414
Offset: 1

Views

Author

Alois P. Heinz, Jul 24 2018

Keywords

Crossrefs

Column k=0 of A317390.
Cf. A180337 (subsequence), A317241.

Programs

  • Maple
    q:= proc(n, s) option remember; is (n=1 or ormap(p->
          q((n-1)/p, s union {p}), numtheory[factorset](n-1) minus s))
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 2, 1+a(n-1)) while q(k, {}) do od; k
        end:
    seq(a(n), n=1..100);
  • 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}]];
    Position[Array[b[#, {}]&, 10^5], 0] // Flatten (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz in A317241 *)

Formula

A317241(a(n)) = 0.

A317385 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 distinct primes.

Original entry on oeis.org

2, 1, 25, 43, 211, 638, 664, 1613, 2991, 7021, 11306, 9439, 17361, 23230, 40886, 38341, 49063, 36583, 99111, 111229, 110631, 171718, 233451, 255531, 309141, 327643, 369519, 521266, 489406, 738544, 682690, 812826, 1048594, 1015096, 2003002, 2118439, 1602360, 2204907, 2850772, 2702743, 2794198
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2018

Keywords

Examples

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

Crossrefs

Row n=1 of A317390.

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(n) option remember; local k;
          for k while n<>b(k, {}) do od; k
        end:
    seq(a(n), n=0..15);
  • 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_, k_] := Module[{h, p, q = 0}, p[_] = {}; While[Length[p[k]] < n, q++; h = b[q, {}]; p[h] = Append[p[h], q]]; p[k][[n]]];
    a[k_] := If[k == 0, 2, A[1, k]];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 14 2021, after Alois P. Heinz in A317390 *)

Formula

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

A317391 Positive integers that have a unique representation 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, 3, 4, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 30, 32, 34, 38, 39, 42, 44, 45, 46, 48, 53, 54, 55, 58, 59, 60, 62, 64, 65, 68, 69, 70, 72, 73, 74, 75, 76, 79, 80, 83, 84, 86, 90, 92, 93, 94, 98, 99, 100, 101, 102, 104, 105, 107, 108, 109
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Crossrefs

Column k=1 of A317390.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
          for p in numtheory[factorset](n-1) minus s while r<2
            do r:= r+b((n-1)/p, s union {p}) od; `if`(r<2, r, 2)
          fi
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>1 do od; k
        end:
    seq(a(n), n=1..100);

Formula

A317241(a(n)) = 1.

A317392 Positive integers that have exactly two 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

25, 29, 37, 40, 41, 49, 51, 52, 67, 71, 77, 85, 87, 88, 89, 97, 103, 112, 115, 123, 125, 126, 127, 130, 137, 139, 145, 146, 148, 149, 155, 157, 161, 169, 175, 181, 183, 186, 191, 199, 202, 209, 214, 217, 222, 223, 229, 232, 235, 238, 239, 241, 243, 248, 249
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Crossrefs

Column k=2 of A317390.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
          for p in numtheory[factorset](n-1) minus s while r<3
            do r:= r+b((n-1)/p, s union {p}) od; `if`(r<3, r, 3)
          fi
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>2 do od; k
        end:
    seq(a(n), n=1..100);

Formula

A317241(a(n)) = 2.

A317393 Positive integers that have exactly three 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

43, 61, 91, 111, 121, 124, 171, 184, 187, 205, 221, 231, 256, 265, 267, 268, 274, 277, 281, 283, 291, 311, 323, 326, 331, 337, 371, 373, 375, 379, 386, 411, 412, 427, 428, 435, 443, 451, 456, 457, 471, 474, 475, 482, 491, 494, 505, 507, 508, 511, 519, 521, 523
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Crossrefs

Column k=3 of A317390.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
          for p in numtheory[factorset](n-1) minus s while r<4
            do r:= r+b((n-1)/p, s union {p}) od; `if`(r<4, r, 4)
          fi
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>3 do od; k
        end:
    seq(a(n), n=1..100);

Formula

A317241(a(n)) = 3.

A317394 Positive integers that have exactly four 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

211, 261, 421, 426, 441, 484, 535, 540, 591, 621, 634, 667, 683, 691, 715, 726, 732, 761, 771, 776, 778, 794, 818, 853, 862, 871, 925, 970, 979, 987, 989, 1011, 1021, 1023, 1038, 1074, 1086, 1105, 1114, 1141, 1171, 1176, 1184, 1190, 1197, 1222, 1261, 1266
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Crossrefs

Column k=4 of A317390.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
          for p in numtheory[factorset](n-1) minus s while r<5
            do r:= r+b((n-1)/p, s union {p}) od; `if`(r<5, r, 5)
          fi
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>4 do od; k
        end:
    seq(a(n), n=1..100);

Formula

A317241(a(n)) = 4.

A317395 Positive integers that have exactly five 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

638, 848, 921, 969, 1002, 1026, 1106, 1156, 1191, 1248, 1276, 1310, 1326, 1341, 1431, 1444, 1480, 1499, 1548, 1592, 1641, 1730, 1764, 1772, 1786, 1856, 1888, 1911, 1996, 2005, 2025, 2038, 2050, 2053, 2061, 2121, 2129, 2131, 2133, 2146, 2171, 2224, 2256, 2258
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Crossrefs

Column k=5 of A317390.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
          for p in numtheory[factorset](n-1) minus s while r<6
            do r:= r+b((n-1)/p, s union {p}) od; `if`(r<6, r, 6)
          fi
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>5 do od; k
        end:
    seq(a(n), n=1..100);

Formula

A317241(a(n)) = 5.

A317396 Positive integers that have exactly six 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

664, 1956, 2058, 2092, 2094, 2283, 2381, 2388, 2432, 2466, 2533, 2624, 2701, 2775, 2822, 2853, 2976, 3070, 3193, 3220, 3316, 3326, 3436, 3442, 3461, 3485, 3529, 3568, 3571, 3576, 3620, 3746, 3784, 3785, 3797, 3826, 3839, 3913, 4005, 4026, 4031, 4213, 4234
Offset: 1

Views

Author

Alois P. Heinz, Jul 27 2018

Keywords

Crossrefs

Column k=6 of A317390.
Cf. A317241.

Programs

  • Maple
    b:= proc(n, s) option remember; local p, r; if n=1 then 1 else r:=0;
          for p in numtheory[factorset](n-1) minus s while r<7
            do r:= r+b((n-1)/p, s union {p}) od; `if`(r<7, r, 7)
          fi
        end:
    a:= proc(n) option remember; local k; for k from
         `if`(n=1, 1, 1+a(n-1)) while b(k, {})<>6 do od; k
        end:
    seq(a(n), n=1..100);

Formula

A317241(a(n)) = 6.
Showing 1-10 of 14 results. Next