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.

A218072 Product of the nonzero digits (in base 10) of n^2.

Original entry on oeis.org

1, 4, 9, 6, 10, 18, 36, 24, 8, 1, 2, 16, 54, 54, 20, 60, 144, 24, 18, 4, 16, 128, 90, 210, 60, 252, 126, 224, 32, 9, 54, 8, 72, 30, 20, 108, 162, 64, 10, 6, 48, 168, 288, 162, 20, 12, 36, 24, 8, 10, 12, 56, 144, 108, 30, 54, 216, 216, 96, 18, 42, 384, 1458
Offset: 1

Views

Author

Nels Olson, Oct 19 2012

Keywords

Examples

			a(32) = 8 because 32*32 = 1024 and 1*2*4 = 8.
		

Crossrefs

Similar to A053667, which does not exclude zero digits from the product.
Related to A218013.

Programs

  • Mathematica
    Table[Times@@(IntegerDigits[n^2]/.(0->1)),{n,120}] (* Harvey P. Dale, Dec 12 2017 *)
  • PARI
    a(n) = {digs = digits(n^2); prod(i=1, #digs, if (digs[i], digs[i], 1));} \\ Michel Marcus, Aug 12 2013
    
  • PARI
    a(n) = vecprod(select(x->(x>1), digits(n^2))); \\ Michel Marcus, Mar 07 2022

Formula

a(n) = A051801(n^2). - Michel Marcus, Mar 07 2022