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

A324550 Primes written in primorial base (A049345).

Original entry on oeis.org

10, 11, 21, 101, 121, 201, 221, 301, 321, 421, 1001, 1101, 1121, 1201, 1221, 1321, 1421, 2001, 2101, 2121, 2201, 2301, 2321, 2421, 3101, 3121, 3201, 3221, 3301, 3321, 4101, 4121, 4221, 4301, 4421, 5001, 5101, 5201, 5221, 5321, 5421, 6001, 6121, 6201, 6221, 6301, 10001, 10201, 10221, 10301, 10321, 10421, 11001, 11121, 11221
Offset: 1

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

Comments

When the primorial base representation is expressed with decimal digits as here, the sequence stays unambiguous only up to the 317th prime, 2099, written as 96421, because after that primorial base digits larger than 9 would be needed.
By writing down terms from a(6) to a(46) (primes 13 .. 199):
201, 221, 301, 321, 421, 1001, 1101, 1121, 1201, 1221, 1321, 1421, 2001, 2101, 2121, 2201, 2301, 2321, 2421, 3101, 3121, 3201, 3221, 3301, 3321, 4101, 4121, 4221, 4301, 4421, 5001, 5101, 5201, 5221, 5321, 5421, 6001, 6121, 6201, 6221, 6301,
and then from a(48) to a(80) (primes 223 .. 409):
10201, 10221, 10301, 10321, 10421, 11001, 11121, 11221, 11321, 11421, 12001, 12101, 12121, 12201, 12321, 13101, 13121, 13201, 13221, 14001, 14101, 14221, 14301, 14321, 14421, 15101, 15201, 15301, 15321, 15421, 16101, 16121, 16301,
it is clearly seen that if n is a prime, then p+n is also likely to be prime, where p is the next higher primorial (A002110) > n. See also A324656.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = Prime[n], p = 2, s = {}, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, AppendTo[s, r]; p = NextPrime[p]]; FromDigits[Reverse[s]]]; Array[a, 100] (* Amiram Eldar, Mar 06 2024 *)
  • PARI
    A324550(n) = A049345(prime(n)); \\ For A049345, see under that entry.

Formula

a(n) = A049345(A000040(n)).

A324642 Number of iterations of map x -> x + A002110(A235224(x)) required to reach a composite when starting from x = n. Here A002110(A235224(x)) gives the least primorial number > x.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 11 2019

Keywords

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 add to that the next larger primorial, which is 6, but now 3+6 = 9 is composite, which we reached in two iteration steps, thus a(1) = 2.
For n = 97, the iteration goes as: 97 -> 307 -> 2617 -> 32647 -> 543157 -> 10242847 -> 233335717 -> 6703028947 -> 207263519077, and only the last term shown is composite, thus a(97) = 8. Written in primorial base (A049345), the terms in that trajectory look as: 3101, 13101, 113101, 1113101, 11113101, 111113101, 1111113101, 11111113101 and 111111113101.
		

Crossrefs

Programs

  • PARI
    A002110(n) = prod(i=1,n,prime(i));
    A235224(n, p=2) = if(nA235224(n\p, nextprime(p+1)));
    A324642(n) = { my(k=0); while((1==n)||isprime(n), n += A002110(A235224(n)); k++); (k); };

Formula

If n is composite, a(n) = 0, and for noncomposite n, a(n) = 1 + a(n+A002110(A235224(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)).
Showing 1-3 of 3 results.