A249894 a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 3.
3, 36, 361, 361201, 36120142809, 3612014280924268428225, 361201428092426842822525044572369542546150009
Offset: 1
Links
- Hiroaki Yamanouchi, Table of n, a(n) for n = 1..10
Programs
-
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++) a(3)
-
Python
def f(x): print(x, end=', ') n = x s = 1 while s < 10**7: if s % 10: S = str(s**2) if S.startswith(str(n)): print(s**2, end=', ') n = s**2 s += 1 f(3)
Extensions
a(7) corrected by Hiroaki Yamanouchi, Nov 17 2014