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 A164834 #25 Jul 16 2022 12:05:22 %S A164834 2,28,126,728,3374,6858,19682,24390,29790,50652,91126,250048,274626, %T A164834 300762,328510,357912,571788,753570,970298,1157626,1295028,1442898, %U A164834 1771560,1860868,2146688,2146690,2460374,2924208,3048624,3442950,3581578,4492124,5000212 %N A164834 Numbers such that the two adjacent integers are a perfect cube and a prime. %C A164834 Subsequence of A163497. %H A164834 Alois P. Heinz, <a href="/A164834/b164834.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Donovan Johnson) %e A164834 2 is a term since 2 has adjacent numbers 1 (cube) and 3 (prime). %e A164834 28 is a term since 28 has adjacent numbers 27 (cube) and 29 (prime). %e A164834 728 is a term since 728 has adjacent numbers 727 (prime) and 729 (cube). %t A164834 Select[Which[PrimeQ[ #+2],#+1,PrimeQ[ #-2],#-1,True,0]&/@(Range[1000]^3),#!=0&] (* _Harvey P. Dale_, Sep 29 2009 *) %o A164834 (Python) %o A164834 from sympy import isprime %o A164834 def aupto(limit): %o A164834 i, c, alst = 1, 1, [] %o A164834 while c <= limit + 1: %o A164834 if isprime(c-2) and c-1 <= limit: alst.append(c-1) %o A164834 if isprime(c+2) and c+1 <= limit: alst.append(c+1) %o A164834 i += 1 %o A164834 c = i**3 %o A164834 return alst %o A164834 print(aupto(5000212)) # _Michael S. Branicky_, Feb 28 2021 %Y A164834 Cf. A163497, A178228. %K A164834 nonn %O A164834 1,1 %A A164834 _Gaurav Kumar_, Aug 28 2009 %E A164834 Edited by _Zak Seidov_, Aug 30 2009 %E A164834 a(20)-a(30) from _Donovan Johnson_, Sep 16 2009