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.

A084006 Squares arising as a concatenation of k and 9's complement of k.

This page as a plain text file.
%I A084006 #20 Mar 21 2025 03:10:58
%S A084006 36,81,1089,4356,9801,110889,443556,998001,11108889,44435556,99980001,
%T A084006 1111088889,4444355556,9999800001,111110888889,444443555556,
%U A084006 999998000001,11111108888889,44444435555556,99999980000001
%N A084006 Squares arising as a concatenation of k and 9's complement of k.
%C A084006 From _Robert Israel_, Sep 09 2020: (Start)
%C A084006 Numbers of the form j^2*x*(10^k-1) where x = A007913(10^k-1) and 10^(k-1)+1 <= j^2*x <= 10^k-1.
%C A084006 If k >= 2 is not in A046412, there are only three terms with 2*k digits, namely (10^k-1)^2/9, 4*(10^k-1)^2/9, and 9*(10^k-1)^2/9.
%C A084006 The first term not of one of those three forms is a(25)=197530863802469136.
%C A084006 (End)
%H A084006 Robert Israel, <a href="/A084006/b084006.txt">Table of n, a(n) for n = 1..367</a>
%e A084006 1089 = 33^2 is a concatenation of 10 and 89, 10+89 = 99.
%p A084006 f:= proc(k) local F,x,p,t;
%p A084006   p:= 10^k-1;
%p A084006   F:= select(t -> t[2]::odd, ifactors(p)[2]);
%p A084006   x:= mul(t[1],t=F);
%p A084006   seq(j^2*x*p, j=ceil(sqrt((10^(k-1)+1)/x))..floor(sqrt(p/x)))
%p A084006 end proc:
%p A084006 map(f, [$1..20]); # _Robert Israel_, Sep 09 2020
%o A084006 (Python)
%o A084006 from itertools import count, islice
%o A084006 from math import prod, isqrt
%o A084006 from sympy import factorint
%o A084006 def A084006_gen(): # generator of terms
%o A084006     for l in count(1):
%o A084006         m = 10**l-1
%o A084006         x = prod(p for p, e in factorint(m).items() if e&1)
%o A084006         yield from (j**2*x*m for j in range(isqrt(10**(l-1)//x)+1,isqrt(m//x)+1))
%o A084006 A084006_list = list(islice(A084006_gen(),20)) # _Chai Wah Wu_, Mar 20 2025
%Y A084006 Cf. A007913, A046412, A084004, A084005, A084007.
%K A084006 base,nonn
%O A084006 1,1
%A A084006 _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 23 2003
%E A084006 More terms from _Ray Chandler_, May 31 2003
%E A084006 Offset changed by _Robert Israel_, Sep 09 2020