|
|
A327241
|
|
a(1) = 1. Thereafter, if n is prime, a(n) is the next prime after a(n-1), but written backwards in base 7; if n is composite, a(n) is the next composite after a(n-1), written backwards in base 7.
|
|
5
|
|
|
1, 2, 3, 4, 5, 6, 1, 4, 6, 8, 29, 18, 37, 26, 45, 34, 19, 44, 41, 6, 8, 15, 23, 24, 31, 32, 39, 40, 47, 48, 197, 102, 296, 153, 10, 36, 19, 44, 27, 4, 5, 6, 1, 4, 6, 8, 29, 18, 44, 27, 4, 6, 1, 4, 6, 8, 15, 16, 23, 24, 11, 36, 26, 45, 34, 5, 1, 4, 6, 8, 29, 18
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The sequence is written in base 10.
Rémy Sigrist's and Andrew Weimholt's methods from A326344 both show that a(n) <= 314, but the true maximum is 310. This can be shown by adapting Weimholt's argument to use values of n mod 30 rather than n mod 6.
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 1 by definition. The next prime after a(6) = 6 is 7_10 = 10_7, so a(7) = 1_7 = 1_10 since 7 is prime.
|
|
MAPLE
|
A:= Vector(100):
A[1]:= 1:
for n from 2 to 100 do
if isprime(n) then
r:= nextprime(A[n-1])
else
for r from A[n-1]+1 while isprime(r) do od
fi;
A[n]:= revdigs(r)
od:
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|