login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A244660 Numbers x such that the base 10 representation of x^2 forms an arithmetic sequence when split into equal-sized chunks. 1

%I #13 Jul 12 2014 18:01:23

%S 11142,11553,14088,16713,18801,22284,23097,23718,26787,28818,323589,

%T 327939,328992,416103,438357,459069,502149,595194,617928,647178,

%U 656457,665853,677019,682230,747099,767748,775782,799233,813861,832986,847266,855897,858648,862014,924366,970767,10174023,10240146

%N Numbers x such that the base 10 representation of x^2 forms an arithmetic sequence when split into equal-sized chunks.

%C This sequence only includes numbers which produce arithmetic sequences of at least three terms (and in fact, no squares containing sequences of more than three terms have been found).

%H Michel Marcus, <a href="/A244660/b244660.txt">Table of n, a(n) for n = 1..142 (up to 10^8)</a>

%e 11142^2 = 124144164 and 124,144,164 is an arithmetic sequence.

%o (Python)

%o from itertools import count

%o .

%o def check(n,power):

%o ...np = str(n**power)

%o ...l=len(np)

%o ...for chunks in range(3,5):

%o ......if l%chunks==0:

%o .........step = l//chunks

%o .........bits = [int(np[i:i+step]) for i in range(0,l,step)]

%o .........diff = bits[1]-bits[0]

%o .........old=bits[1]

%o .........go = True

%o .........for bit in bits[2:]:

%o ............if bit-old!=diff:

%o ...............go=False

%o ...............break

%o ............old = bit

%o .........if go:

%o ............return True

%o .

%o for n in count(1):

%o ...if check(n,2):

%o ......print(n)

%o (PARI) isoneap(vch) = {r = vch[2] - vch[1]; for (i=3, #vch, if (vch[i] - vch[i-1] != r, return (0));); return (1);}

%o isap(vd, nch, nd) = {npch = nd/nch; vch = vector(nch); ich = 1; inew = 1; for (i=1, nd, if (inew, vch[ich] = vd[i]; inew = 0;, vch[ich] = 10*vch[ich] + vd[i]); if ((i % npch) == 0, ich++; inew = 1);); isoneap(vch);}

%o isok(n) = {vd = digits(n^2); nd = #vd; if (isprime(nd), return(0)); ok = 0; fordiv(nd, nch, if (nch > 2, if(isap(vd, nch, nd), return (1)));); return (0);} \\ _Michel Marcus_, Jul 06 2014

%K nonn,base

%O 1,1

%A _Christian Perfect_, Jul 04 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 07:54 EDT 2024. Contains 371922 sequences. (Running on oeis4.)