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.

A249893 a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 2.

This page as a plain text file.
%I A249893 #28 May 22 2025 10:21:41
%S A249893 2,25,256,256036,2560361612769,256036161276932002260000001,
%T A249893 256036161276932002260000001607597862784080913990785121
%N A249893 a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 2.
%C A249893 a(12) has 1717 digits. - _Michael S. Branicky_, Feb 25 2021
%H A249893 Michael S. Branicky, <a href="/A249893/b249893.txt">Table of n, a(n) for n = 1..11</a> (terms 1..10 from Hiroaki Yamanouchi)
%o A249893 (PARI) a(n)=k=n;s=1;while(s<5*10^7,if(s%10,if(s^2\(10^(#Str(s^2)-#Str(k)))==k,print1(s^2,", ");k=s^2));s++)
%o A249893 a(2)
%o A249893 (Python)
%o A249893 def f(x):
%o A249893   print(x,end=', ')
%o A249893   n = x
%o A249893   s = 1
%o A249893   while s < 10**7:
%o A249893     if s % 10:
%o A249893       S = str(s**2)
%o A249893       if S.startswith(str(n)):
%o A249893         print(s**2,end=', ')
%o A249893         n = s**2
%o A249893     s += 1
%o A249893 f(2)
%o A249893 (Python)
%o A249893 from math import isqrt
%o A249893 def anext(an):
%o A249893   lo, hi = an*10, an*10 + 9
%o A249893   while True:
%o A249893     found = False
%o A249893     if isqrt(hi)**2 > lo: return (isqrt(lo)+1)**2
%o A249893     lo, hi = lo*10, hi*10 + 9
%o A249893 n, an = 1, 2
%o A249893 for n in range(2, 17):
%o A249893   an = anext(an)
%o A249893   print(n, an) # _Michael S. Branicky_, Feb 25 2021
%Y A249893 Cf. A048559, A048561.
%K A249893 nonn,base
%O A249893 1,1
%A A249893 _Derek Orr_, Nov 08 2014