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.

Previous Showing 11-20 of 20 results.

A328404 The length of primorial base expansion (number of significant digits) of A276086(n), where A276086(n) converts primorial base expansion of n into its prime product form.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 2, 3, 3, 4, 4, 4, 3, 4, 4, 4, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 4, 5, 5, 5, 5, 6, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 5, 5, 5, 5, 6, 6, 5, 6, 6, 6, 6, 7, 6, 6, 6, 7
Offset: 0

Views

Author

Antti Karttunen, Oct 16 2019

Keywords

Crossrefs

Cf. A328402 (number of times each n occurs in this sequence).

Programs

  • Mathematica
    Block[{b = MixedRadix[Reverse@ Prime@ Range@ 120]}, Array[IntegerLength[Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ #, Reverse@ #} &@ IntegerDigits[#, b], b] &, 105, 0]] (* Michael De Vlieger, Oct 17 2019 *)
  • PARI
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A328404(n) = A235224(A276086(n));

Formula

a(n) = A235224(A276086(n)) = A061395(A276087(n)).
For all n, a(A143293(n-1)) = n+1.
For all n, A000040(a(n)) > A328389(n).

A328405 The length of primorial base expansion (number of significant digits) of A276086(A276086(n)), where A276086(n) converts primorial base expansion of n into its prime product form.

Original entry on oeis.org

2, 2, 3, 2, 4, 4, 3, 4, 4, 3, 5, 5, 5, 6, 6, 6, 5, 5, 7, 6, 9, 8, 10, 14, 11, 12, 14, 12, 12, 15, 3, 4, 5, 4, 5, 6, 4, 5, 7, 3, 8, 5, 9, 9, 8, 7, 12, 7, 8, 12, 8, 7, 12, 14, 16, 15, 15, 15, 11, 12, 5, 6, 8, 7, 7, 8, 5, 7, 9, 9, 14, 12, 12, 9, 12, 7, 15, 15, 12, 12, 18, 13, 20, 17, 11, 13, 15, 14, 17, 13, 8, 9, 11, 14, 11, 13, 11, 10, 10, 10
Offset: 0

Views

Author

Antti Karttunen, Oct 16 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Block[{b = MixedRadix[Reverse@ Prime@ Range@ 120], f}, f[n_] := Times @@ Power @@@ # &@ Transpose@ {Prime@ Range@ Length@ #, Reverse@ #} &@ IntegerDigits[n, b]; Array[IntegerLength[Nest[f, #, 2], b] &, 100, 0]] (* Michael De Vlieger, Oct 17 2019 *)
  • PARI
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A276087(n) = A276086(A276086(n));
    A328405(n) = A235224(A276087(n));

Formula

a(n) = A235224(A276087(n)) = A061395(A328403(n)).
For all n, A000040(a(n)) > A328394(n).

A383300 Numbers k such that primorial base expansion of k has the primorial base expansion of k' as its suffix, where k' stands for the arithmetic derivative of k (A003415).

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 11, 13, 17, 19, 23, 27, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331
Offset: 1

Views

Author

Antti Karttunen, May 15 2025

Keywords

Comments

a(n) = A348283(n) for n=1 and n=3..334432. a(334433) = 4784261, which is not present in A348283 (see examples). - R. J. Mathar and Antti Karttunen, May 16 2025

Examples

			0 is a term as A003415(0) = 0.
1 is a term as A003415(1) = 0, whose primorial base expansion is here understood as an empty sequence of digits, thus it is a suffix of A049345(1) = 1.
3, like all odd primes, is a term as A003415(3) = 1, with A049345(3) = 11 and A049345(1) = 1.
4 and 27 are terms as they are in A051674 (the nonzero fixed points of A003415).
4784261 is a term as A003415(4784261) = 189671, with A049345(4784261) = 96411121 and A049345(189671) = 6411121. 4784261 is the first term > 1 of this sequence that is not in A348283. See more examples in A383301.
		

Crossrefs

Disjoint union of {1}, A348283\{2} and A383301.
Cf. A006005, A051674 (other subsequences).
Subsequence of A383299.
Cf. also A383933.

Programs

  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    isA383300(n) = if(n<2, 1, my(p=2, k=A003415(n)); while(k, if((k%p)!=(n%p), return(0)); n = n\p; k = k\p; p = nextprime(1+p)); (1));
    
  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    isA383300(n) = { my(ad=A003415(n)); (n%A002110(A235224(ad))==ad); };

Formula

{k such that A003415(k) is equal to k modulo A002110(A235224(A003415(k)))}.

A324656 a(n) is the number of successive primorials A002110(i) larger than n that need to be tried before sum n + A002110(i) is found to be composite.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

Comments

a(n) = 0 if n + A002110(A235224(n)), i.e., n plus {the least primorial > n} is composite.
a(n) = 1 if n + A002110(A235224(n)) is prime, but n + A002110(1+A235224(n)) is composite.
a(n) = k if n + A002110(j+A235224(n)) is prime for j=0..k-1, but n + A002110(k+A235224(n)) is composite.

Examples

			For n=1, it is not a composite number, so we add a next larger primorial (A002110) to it, which is 2, and we see that 3 is also noncomposite, thus we try to add (to the original n, which is 1) the next larger primorial, which is 6, and 7 is also prime, as are also 31, 211 and 2311. Only with A002110(6), 30030 + 1 is not a prime, thus a(1) = 5.
For n=3, the next larger primorial is 6, but 3+6 = 9 is composite, thus a(3) = 0.
For n=29, which is prime, we try adding it to four successively larger primorial numbers 30, 210, 2310, 30030, until we find 510510 which gives sum 510539 which is composite, thus a(29) = 4. In primorial base (A049345), 29 is written as 421 and the successive sums tested are: 1421, 10421, 100421, 1000421 and 10000421.
For n=121, which is not prime, but 210+121 = 331 is, while 2310+121 = 2431 is not, a(121) = 1.
		

Crossrefs

Programs

A333658 a(n) is the greatest number m not yet in the sequence such that the primorial base expansions of n and of m have the same digits (up to order but with multiplicity).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 7, 9, 14, 15, 12, 13, 10, 11, 16, 17, 18, 20, 19, 21, 22, 23, 24, 26, 25, 27, 28, 29, 30, 36, 32, 38, 66, 68, 31, 37, 33, 39, 67, 69, 62, 63, 44, 45, 74, 75, 96, 98, 97, 99, 104, 105, 126, 128, 127, 129, 134, 135, 60, 61, 42, 43, 72, 73
Offset: 0

Views

Author

Rémy Sigrist, Sep 02 2020

Keywords

Comments

Leading 0's are ignored.
This sequence is a permutation of the nonnegative integers, which preserves the number of digits (A235224) and the sum of digits (A276150) in primorial base.

Examples

			For n = 42:
- the primorial base representation of 42 is "1200",
- there are five numbers m with the same multiset of digits:
    m   prim(m)
    --  -------
    34  "1020"
    42  "1200"
    61  "2001"
    62  "2010"
    66  "2100"
- so a(34) = 66,
     a(42) = 62,
     a(61) = 61,
     a(62) = 42,
     a(66) = 34.
		

Crossrefs

See A333659 and A337598 for similar sequences.

Programs

  • PARI
    See Links section.

Formula

a(A002110(n)) = A002110(n) for any n >= 0.

A338835 a(n) is the greatest number not yet in the sequence with the same number of digits and the same sum of digits as n in primorial base.

Original entry on oeis.org

0, 1, 2, 4, 3, 5, 6, 12, 8, 18, 14, 24, 7, 13, 10, 20, 19, 26, 9, 16, 15, 25, 22, 28, 11, 21, 17, 27, 23, 29, 30, 60, 36, 90, 66, 120, 32, 62, 61, 96, 92, 150, 42, 91, 72, 126, 122, 180, 68, 121, 102, 156, 152, 186, 98, 151, 132, 182, 181, 192, 31, 38, 37, 67
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2020

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			For n = 8:
- the numbers with 3 digits and sum of digits 2 in primorial base are: 7 ("101"), 8 ("110") and 12 ("200"),
- so a(7) = 12,
     a(8) = 8,
     a(12) = 7.
		

Crossrefs

Cf. A235224, A276150, A333658, A338829 (decimal analog), A338834 (factorial base analog).

Programs

  • PARI
    See Links section.

Formula

A235224(a(n)) = A235224(n).
A276150(a(n)) = A276150(n).

A324657 a(n) is the number of successive primorials A002110(i) larger than prime(n) that need to be tried before sum prime(n)+A002110(i) is found to be composite.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

Comments

See comments and examples in A324656.

Crossrefs

Programs

Formula

a(n) = A324656(A000040(n)).

A372559 a(n) is the index of the first occurrence of n in A371091.

Original entry on oeis.org

0, 1, 3, 9, 21, 51, 111, 321, 741, 2001, 4311, 8931, 22791, 52821, 112881, 293061, 803571, 1824591, 4887651, 14587341, 33986721, 92184861, 208581141, 431674011, 877859751, 2216416971, 4893531411, 11363224641, 24302611101, 63120770481, 140757089241, 341317579371, 742438559631, 1945801500411, 4352527381971, 11773265516781
Offset: 0

Views

Author

Antti Karttunen, May 11 2024

Keywords

Comments

The pattern in the primorial base expansion (A049345) of the terms is constructed recursively, so that the digit-positions of the primorial base expansion are successively filled with the positive terms of this sequence (1, 3, 9, 21, ...), up to that term that still fits to the position, i.e., is less than prime(i), for the positions i >= 1 indexed from the least significant end of the expansion. The nonleading digits are "frozen", and only the most significant digit keeps on increasing from a(1) to the maximal allowed a(x) for its position, after which the next term's expansion is obtained by prepending 1 to the front. See the examples.

Examples

			   n,      a(n)     in primorial base
   0,         0 =             0
   1,         1 =             1
   2,         3 =            11
   3,         9 =           111
   4,        21 =           311 (3 is less than prime(3)=5, so can be used now)
   5,        51 =          1311 (9 cannot yet be used, so append 1 to the front)
   6,       111 =          3311 (and then replace by next higher term that fits)
   7,       321 =         13311
   8,       741 =         33311
   9,      2001 =         93311 (9 is less than prime(5)=11, so can be used now)
  10,      4311 =        193311
  11,      8931 =        393311
  12,     22791 =        993311
  13,     52821 =       1993311
  14,    112881 =       3993311
  15,    293061 =       9993311
  16,    803571 =      19993311
  17,   1824591 =      39993311
  18,   4887651 =      99993311
  19,  14587341 =     199993311
  20,  33986721 =     399993311
  21,  92184861 =     999993311
  22, 208581141 =  {21}99993311 (21 is less than prime(9)=23, so can be used now)
  23, 431674011 = 1{21}99993311
etc.
		

Crossrefs

Positions of records in A371091.

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    A276153(n) = { my(p=2,d=0); while(n, d = n%p; n = n\p; p = nextprime(1+p)); (d); };
    memoA372559 = Map();
    A372559(n) = if(n<=2, n+(n>1), my(v); if(mapisdefined(memoA372559,n,&v), v, my(prev=A372559(n-1), hi=A235224(prev), hd=A276153(prev),k=0,u); while(A372559(k)A372559(1+k); v = if(u>=prime(hi), prev+A002110(hi), prev+((u-hd)*A002110(hi-1))); mapput(memoA372559,n,v); (v)));

Formula

For n >= 0, A371091(a(n)) = n, and for all k < a(n), A371091(k) < n.

A343477 Numbers k whose representations in primorial base include each of the digits from 0 to d-1 exactly once, where d is the number of digits of k in primorial base.

Original entry on oeis.org

0, 2, 10, 13, 14, 52, 79, 80, 95, 100, 103, 104, 328, 352, 535, 536, 559, 560, 659, 688, 715, 716, 755, 760, 763, 764, 863, 892, 919, 920, 935, 940, 943, 944, 3118, 3322, 3478, 3502, 5425, 5426, 5629, 5630, 5785, 5786, 5809, 5810, 7109, 7318, 7525, 7526, 7925
Offset: 1

Views

Author

Amiram Eldar, Apr 16 2021

Keywords

Examples

			2 is a term since its primorial base representation is {1, 0}.
10, 13 and 14 are terms since their primorial base representations are {1, 2, 0}, {2, 0, 1} and {2, 1, 0}, respectively.
		

Crossrefs

Programs

  • Mathematica
    m = 6; bases = Reverse @ Prime @ Range[m]; max = Times @@ bases; primBase[n_] := IntegerDigits[n, MixedRadix[bases]]; q[n_] := Union[(pd = primBase[n])] == Range[0, Length[pd] - 1]; Select[Range[0, max], q]

A383301 Numbers k whose primorial base expansion has the primorial base expansion of k' as its nontrivial proper suffix, where k' stands for the arithmetic derivative of k (A003415).

Original entry on oeis.org

4784261, 338634851, 433979267, 713516597, 829765697, 1092143279, 1790536511, 2518099229, 8107348511
Offset: 1

Views

Author

Antti Karttunen, May 15 2025

Keywords

Comments

Here "nontrivial proper suffix" means suffix whose length is > 1, but less than the length of the string whose suffix it is.

Examples

			k          (in primorial base, A049345)   k'       (in primorial base)
--------------------------------------------------------------------------
4784261    (9:6:4:1:1:1:2:1)              189671   (6:4:1:1:1:2:1)
338634851  (1:11:17:5:7:1:6:1:2:1)        8845391  (17:5:7:1:6:1:2:1)
433979267  (1:21:14:1:6:8:6:2:2:1)        7192907  (14:1:6:8:6:2:2:1)
713516597  (3:4:10:11:1:7:0:2:2:1)        5439227  (10:11:1:7:0:2:2:1)
829765697  (3:16:10:6:2:10:1:2:2:1)       5292047  (10:6:2:10:1:2:2:1)
1092143279 (4:20:11:5:5:3:1:4:2:1)        5777999  (11:5:5:3:1:4:2:1)
1790536511 (8:0:11:5:12:0:2:1:2:1)        5793551  (11:5:12:0:2:1:2:1)
2518099229 (11:6:11:8:10:2:4:4:2:1)       5879519  (11:8:10:2:4:4:2:1)
8107348511 (1:7:7:15:14:12:7:3:1:2:1)     76005191 (7:15:14:12:7:3:1:2:1)
Note that 4784261 = 9*A002110(7) + 189671.
		

Crossrefs

Subsequence of A048103 and of A383300.

Programs

  • PARI
    A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
    isA383301(n) = if(n<2, 0, my(p=2, k=A003415(n), i=0); while(k, if((k%p)!=(n%p), return(0)); n = n\p; k = k\p; p = nextprime(1+p); i++); (n>0)&&(i>1));
    
  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A235224(n) = { my(s=0, p=2); while(n, s++; n = n\p; p = nextprime(1+p)); (s); };
    isA383301(n) = { my(ad=A003415(n)); ((ad>1) && (adA002110(A235224(ad))==ad)); };

Formula

{k such that 1 < k' < k, and k' is equal to k modulo A002110(A235224(k')), where k' = A003415(k)}.
Previous Showing 11-20 of 20 results.