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.

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

Original entry on oeis.org

5, 529, 529984, 52998485796, 5299848579629072273476, 529984857962907227347600150092608188876380736
Offset: 1

Views

Author

Derek Orr, Nov 08 2014

Keywords

Crossrefs

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(5)
    
  • 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(5)