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.

A179055 Numbers k such that the product of all numbers formed by cyclically permuting digits of k is a square.

Original entry on oeis.org

1, 4, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 243, 324, 432, 567, 675, 756, 1000, 1010, 1020, 1030, 1040, 1050, 1060, 1070, 1080, 1090, 1111, 1212, 1313, 1414, 1515, 1616, 1717, 1818, 1919, 2000, 2010, 2020, 2030, 2040, 2050, 2060, 2070, 2080, 2090, 2121, 2222, 2323, 2424
Offset: 1

Views

Author

Michel Lagneau, Jan 04 2011

Keywords

Examples

			756 is in the sequence because 756 * 567 * 675 = 289340100 = 17010^2.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 4000 do:pp:=1:n0:=n:l:=length(n0) :ind:=0:for
      j from 1 to l do:s:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v
      :s:=s+ u*10^m:od:s:=floor(s-u*10^l+u):n0:=s: pp:=pp*s:od:x:=sqrt(pp) :y:=floor(x):if
      x=y then printf(`%d, `, n): else fi :od:
  • Mathematica
    cycDigitPerms[n_Integer, b_:10] := Module[{list = {n}, digits = IntegerDigits[n, b], len, counter, holder, next}, len = Length[digits]; counter = 1; While[counter < len, holder = digits[[-1]]; digits = Drop[digits, -1]; digits = Insert[digits, holder, 1]; list = Append[list, FromDigits[digits, b]]; counter++]; Return[list]]; Select[Range[2000], IntegerQ[Sqrt[Times@@cycDigitPerms[#]]] &] (* Alonso del Arte, Jan 04 2011 *)