OFFSET
2,1
COMMENTS
Chains must have exactly n elements (else terms would be nondecreasing). - Michael S. Branicky, Oct 07 2025
LINKS
Michael S. Branicky, Table of n, a(n) for n = 2..11055 (first 58 terms from Michael S. Branicky, then next 1680 terms from David A. Corneth)
Michael S. Branicky, Table of n, a(n) for n = 2..18981 and all other terms < 10^10
Michael S. Branicky, Python program for producing b-file
David A. Corneth, PARI program
S. S. Gupta, Fascinating Squares
EXAMPLE
a(5) = 128 is the starting term of the 5-tuple(128,178,191,196,209) having squares (16384,31684,36481,38416,43681).
From Jeffrey Shallit, Aug 21 2020, corrections by Michael S. Branicky, Oct 07 2025: (Start)
Here are the n-chains corresponding to the first few terms:
2: 12, 21;
3: 13, 14, 31;
4: 102, 120, 201, 210;
5: 128, 178, 191, 196, 209;
6: 103, 130, 140, 247, 301, 310;
7: 1023, 1302, 1395, 2013, 2301, 2493, 3105;
8: 1003, 1030, 1300, 1400, 2470, 3001, 3010, 3100;
9: 3206, 3292, 4804, 5699, 6181, 6199, 6509, 6901, 8494;
10: 3514, 4396, 4406, 5593, 5909, 6556, 6944, 9013, 9121, 9572;
11: 3774, 5592, 6132, 6432, 6561, 6639, 6858, 6879, 7812, 8568, 8571;
12: 10013, 10031, 10130, 10310, 11003, 11030, 13001, 13010, 30011, 30110, 31001, 31010;
13: 10012, 10021, 10120, 10210, 11002, 11020, 12001, 12010, 14179, 20011, 20110, 21001, 21010;
14: 10172, 12688, 13952, 17521, 20837, 21553, 22259, 22457, 22592, 23321, 24707, 26138, 28312, 30571;
... (End)
PROG
(Python) # see links for an alternate program suitable for generating b-file
from math import isqrt
from itertools import count, islice, permutations
def agen(verbose=False): # generator of terms
adict, n, seen = dict(), 2, set()
for m in count(10):
k = "".join(sorted(str(m**2)))
if k in seen: continue
seen.add(k)
ub = isqrt(int(k[::-1]))
v = 1 + sum(1 for i in range(m+1, ub+1) if "".join(sorted(str(i**2))) == k)
if v > 0 and v not in adict:
if verbose: print("FOUND", v, m)
adict[v] = m
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 10))) # Michael S. Branicky, Oct 07 2025, edited Oct 09 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Jul 03 2003
EXTENSIONS
a(7)-a(31) from Jeffrey Shallit, Aug 21 2020
Corrected terms and a(32) and beyond from Michael S. Branicky, Oct 07 2025
STATUS
approved
