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.

A248126 a(n) = n^2 with each digit repeated.

Original entry on oeis.org

11, 44, 99, 1166, 2255, 3366, 4499, 6644, 8811, 110000, 112211, 114444, 116699, 119966, 222255, 225566, 228899, 332244, 336611, 440000, 444411, 448844, 552299, 557766, 662255, 667766, 772299, 778844, 884411, 990000, 996611, 11002244, 11008899, 11115566
Offset: 1

Views

Author

Jon Perry, Nov 01 2014

Keywords

Comments

Inspired by A116699.

Examples

			13^2 = 169, so a(13) = 116699.
		

Crossrefs

Programs

  • JavaScript
    for (i=1;i<40;i++) {
    s=(i*i).toString();
    for (j=0;j
    				
  • Mathematica
    a248126[n_Integer] :=
    Module[{m}, m := IntegerDigits[n^2];
      FromDigits[Flatten[Transpose[List[m, m]]]]]; a248126 /@ Range[34] (* Michael De Vlieger, Nov 06 2014 *)
    Table[FromDigits[Riffle[id=IntegerDigits[n^2],id]],{n,40}] (* Harvey P. Dale, Dec 19 2015 *)
  • PARI
    a(n)= my(d = 11*digits(n^2)); fromdigits(d, 100) \\ David A. Corneth, Dec 02 2023
    
  • Python
    def a(n): return int("".join(d*2 for d in str(n**2)))
    print([a(n) for n in range(1, 35)]) # Michael S. Branicky, Dec 02 2023