OFFSET
1,1
COMMENTS
In A002808(n)-base numeral system, a(n) is the smallest prime number for which the digital root is 1.
Conjecture: As n approaches infinity, the probability that a prime number is a term in this sequence approaches 1.
Conjecture: There are infinitely many primes that are not terms in this sequence.
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=20, A072668(20)=31, and 311 is the smallest prime number p larger than 31 such that p is equal to 1 (mod 31), so a(20)=311.
MATHEMATICA
Map[Block[{p = NextPrime[#]}, While[Mod[p, #] != 1, p = NextPrime[p]]; p] &, Select[Range[4, 78], CompositeQ] - 1] (* Michael De Vlieger, Dec 10 2020 *)
PROG
(PARI)
f(x) = {my(p=nextprime(x)); while ((p % x) != 1, p = nextprime(p+1)); p; }
lista(nn) = {my(list = List()); forcomposite(c=1, nn, listput(list, f(c-1)); ); Vec(list); } \\ Michel Marcus, Nov 17 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ahmad J. Masad, Nov 15 2020
EXTENSIONS
More terms from Michel Marcus, Nov 17 2020
STATUS
approved