%I #50 Dec 03 2023 09:12:13
%S 1,1,2,3,5,7,11,17,23,37,59,89,139,227,359,577,929,1499,2423,3919,
%T 6337,10253,16573,26821,43391,70207,113591,183797,297377,481171,
%U 778541,1259701,2038217,3297913,5336129,8633983,13970093,22604069
%N a(0)=1, a(1)=1, a(n) = largest prime <= a(n-1) + a(n-2).
%C Or might be called Ishikawa primes, as he proved that prime(n+2) < prime(n) + prime(n+1) for n > 1. This improves on Bertrand's Postulate (Chebyshev's theorem), which says prime(n+2) < prime(n+1) + prime(n+1). - _Jonathan Sondow_, Sep 21 2013
%H Michael De Vlieger, <a href="/A055500/b055500.txt">Table of n, a(n) for n = 0..1000</a> (first 100 terms from Zak Seidov)
%H Heihachiro Ishikawa, <a href="http://www.jstor.org/stable/43700113">Über die Verteilung der Primzahlen</a>, Sci. Rep. Tokyo Bunrika Daigaku, Sect. A 2 (1934), 27-40.
%F a(n) is asymptotic to C*phi^n where phi = (1+sqrt(5))/2 and C = 0.41845009129953131631777132510164822489... - _Benoit Cloitre_, Apr 21 2003
%F a(n) = A007917(a(n-1) + a(n-2)) for n > 1. - _Reinhard Zumkeller_, May 01 2013
%F a(n) >= prime(n-1) for n > 1, by Ishikawa's theorem. - _Jonathan Sondow_, Sep 21 2013
%e a(8) = 23 because 23 is largest prime <= a(7) + a(6) = 17 + 11 = 28.
%t PrevPrim[n_] := Block[ {k = n}, While[ !PrimeQ[k], k-- ]; Return[k]]; a[1] = a[2] = 1; a[n_] := a[n] = PrevPrim[ a[n - 1] + a[n - 2]]; Table[ a[n], {n, 1, 42} ]
%t (* Or, if version >= 6 : *)a[0] = a[1] = 1; a[n_] := a[n] = NextPrime[ a[n-1] + a[n-2] + 1, -1]; Table[a[n], {n, 0, 100}](* _Jean-François Alcover_, Jan 12 2012 *)
%t nxt[{a_,b_}]:={b,NextPrime[a+b+1,-1]}; Transpose[NestList[nxt,{1,1},40]] [[1]] (* _Harvey P. Dale_, Jul 15 2013 *)
%o (Haskell)
%o a055500 n = a055500_list !! n
%o a055500_list = 1 : 1 : map a007917
%o (zipWith (+) a055500_list $ tail a055500_list)
%o -- _Reinhard Zumkeller_, May 01 2013
%o (Python)
%o from sympy import prevprime; L = [1, 1]
%o for _ in range(36): L.append(prevprime(L[-2] + L[-1] + 1))
%o print(*L, sep = ", ") # _Ya-Ping Lu_, May 05 2023
%Y Cf. A007917, A055498, A055499, A055400, A055401, A055502, A065435.
%K nonn,easy,nice
%O 0,3
%A _N. J. A. Sloane_, Jul 08 2000