login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A290630 a(n+1) = a(n) + (final digit of greatest prime < a(n)); a(1)=3. 1
3, 5, 8, 15, 18, 25, 28, 31, 40, 47, 50, 57, 60, 69, 76, 79, 82, 91, 100, 107, 110, 119, 122, 125, 128, 135, 136, 137, 138, 145, 154, 155, 156, 157, 158, 165, 168, 175, 178, 181, 190, 191, 192, 193, 194, 197, 200, 209, 218, 219, 220, 221, 222, 223, 224, 227, 230, 239, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Let a(n) be composite, and gp(n) be the greatest prime less than a(n), with final digit d(n). Then sp(n), the smallest prime greater than a(n) is in the sequence if and only if d(n) divides (sp(n) - a(n)), in which case (sp(n) - a(n))/d(n) is the integer m, and a(n + m) = sp(n).
If a(n) is prime, with final digit d'(n) then sp(n) (the next prime after a(n)) is in the sequence if and only if sp(n) = a(n)+ d(n) + r * d'(n) for some r >= 1, in which case
a(n + r + 1) = sp(n).
Primes appearing in the sequence are 3, 5, 31, 47, 79, 107, 137, 157, 181, 191, 193, 197, ... If a prime occurs at a(n), a(n+2) = a(n+1) + d(n) only if there is no prime between a(n) and a(n+1).
Primes in the sequence whose final digit is not contributed to a subsequent term include 3, 5, 31, 107, 197, ...
Primes not appearing in the sequence but which contribute a final digit include 2, 7, 13, 17, 23, 29, 37, ...
LINKS
FORMULA
a(n+1) = a(n) + d(n) where d(n) = A007652(gp(n)); gp(n) = greatest prime < a(n).
EXAMPLE
a(2) = a(1) + gp(1) = 3 + 2 = 5.
a(59) = 242 (composite), gp(59) = 241, and d(59) = 1. sp(59) = 251 is in the sequence because (sp(59) - a(59))/d(59) = (251 - 242)/1 = 9 (= m). Therefore a(59 + 9) = a(68) = 251.
a(40) = 181 (prime), d'(40) = 1, gp(40) = 179, d(40) = 9. Then sp(40) = 191 is in the sequence because with r = 1,
a(40) + d(40) + r*d'(40) = 181 + 9 + 1*1 = 191 = a(40+1+1) = a(42).
MAPLE
A[1]:= 3:
for i from 2 to 100 do
A[i]:= A[i-1] + (prevprime(A[i-1]) mod 10)
od:
seq(A[i], i=1..100); # Robert Israel, Aug 13 2019
MATHEMATICA
NestList[# + Mod[NextPrime[#, -1], 10] &, 3, 68] (* Michael De Vlieger, Aug 19 2017 *)
PROG
(PARI) lista(nn) = {print1(a = 3, ", "); for (n=2, nn, a = a + precprime(a-1) % 10; print1(a, ", "); ); } \\ Michel Marcus, Aug 19 2017
CROSSREFS
Sequence in context: A080999 A077579 A076797 * A359851 A193147 A052977
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 08:27 EDT 2024. Contains 371698 sequences. (Running on oeis4.)