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.

A290630 a(n+1) = a(n) + (final digit of greatest prime < a(n)); a(1)=3.

This page as a plain text file.
%I A290630 #31 Aug 14 2019 01:48:25
%S A290630 3,5,8,15,18,25,28,31,40,47,50,57,60,69,76,79,82,91,100,107,110,119,
%T A290630 122,125,128,135,136,137,138,145,154,155,156,157,158,165,168,175,178,
%U A290630 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
%N A290630 a(n+1) = a(n) + (final digit of greatest prime < a(n)); a(1)=3.
%C A290630 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).
%C A290630 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
%C A290630 a(n + r + 1) = sp(n).
%C A290630 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).
%C A290630 Primes in the sequence whose final digit is not contributed to a subsequent term include 3, 5, 31, 107, 197, ...
%C A290630 Primes not appearing in the sequence but which contribute a final digit include 2, 7, 13, 17, 23, 29, 37, ...
%H A290630 Robert Israel, <a href="/A290630/b290630.txt">Table of n, a(n) for n = 1..10000</a>
%F A290630 a(n+1) = a(n) + d(n) where d(n) = A007652(gp(n)); gp(n) = greatest prime < a(n).
%e A290630 a(2) = a(1) + gp(1) = 3 + 2 = 5.
%e A290630 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.
%e A290630 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,
%e A290630 a(40) + d(40) + r*d'(40) = 181 + 9 + 1*1 = 191 = a(40+1+1) = a(42).
%p A290630 A[1]:= 3:
%p A290630 for i from 2 to 100 do
%p A290630   A[i]:= A[i-1] + (prevprime(A[i-1]) mod 10)
%p A290630 od:
%p A290630 seq(A[i],i=1..100); # _Robert Israel_, Aug 13 2019
%t A290630 NestList[# + Mod[NextPrime[#, -1], 10] &, 3, 68] (* _Michael De Vlieger_, Aug 19 2017 *)
%o A290630 (PARI) lista(nn) = {print1(a = 3, ", "); for (n=2, nn, a = a + precprime(a-1) % 10; print1(a, ", "););} \\ _Michel Marcus_, Aug 19 2017
%Y A290630 Cf. A000040, A007652.
%K A290630 nonn,base
%O A290630 1,1
%A A290630 _David James Sycamore_, Aug 07 2017