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.
%I A215099 #17 Nov 10 2024 16:00:50 %S A215099 0,1,2,4,5,7,8,10,11,13,18,24,25,29,34,38,39,41,44,48,53,55,56,58,71, %T A215099 73,78,84,85,89,94,102,103,109,120,124,131,133,138,144,145,149,162, %U A215099 164,169,173,178,180,181,187,192,196,197,201 %N A215099 a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is prime. %C A215099 For n>0 and (n mod 4)<2, a(n) is odd. %C A215099 Same definition, but k+a(n-2) is a %C A215099 Fibonacci number: A006498 except first two terms, %C A215099 Lucas number: A000045 except first two terms, %C A215099 Pell number: A089928(n-1), %C A215099 Jacobsthal number: A215095, %C A215099 factorial: A215096, %C A215099 square: A194274, %C A215099 cube: A215097, %C A215099 triangular number: A011848(n+2), %C A215099 oblong number: A215098. %C A215099 Example of a related sequence definition: a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a cube. %H A215099 Iain Fox, <a href="/A215099/b215099.txt">Table of n, a(n) for n = 0..10000</a> %o A215099 (Python) %o A215099 from sympy import prime %o A215099 prpr = 0 %o A215099 prev = 1 %o A215099 for n in range(77): %o A215099 print(prpr, end=', ') %o A215099 b = c = 0 %o A215099 while c<=prev: %o A215099 c = prime(b+1) - prpr %o A215099 b+=1 %o A215099 prpr = prev %o A215099 prev = c %o A215099 (PARI) first(n) = my(res = vector(n, i, i-1), k); for(x=3, n, k=res[x-1]+1; while(!isprime(k+res[x-2]), k++); res[x]=k); res \\ _Iain Fox_, Apr 22 2019 (corrected by _Iain Fox_, Apr 25 2019) %Y A215099 Cf. A062042: a(1) = 2, a(n) = least k>a(n-1) such that k+a(n-1) is a prime. %Y A215099 Cf. A073627, A073628. %K A215099 nonn %O A215099 0,3 %A A215099 _Alex Ratushnyak_, Aug 03 2012