Search: a085306 -id:a085306
|
|
A061909
|
|
Skinny numbers: numbers n such that there are no carries when n is squared by "long multiplication".
|
|
+10
37
|
|
|
0, 1, 2, 3, 10, 11, 12, 13, 20, 21, 22, 30, 31, 100, 101, 102, 103, 110, 111, 112, 113, 120, 121, 122, 130, 200, 201, 202, 210, 211, 212, 220, 221, 300, 301, 310, 311, 1000, 1001, 1002, 1003, 1010, 1011, 1012, 1013, 1020, 1021, 1022, 1030, 1031, 1100, 1101, 1102
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
There are several equivalent formulations. Suppose the decimal expansion of n is n = Sum_{i = 0..k } d_i 10^i, where 0 <= d_i <= 9 for i = 0..k.
Then n is skinny if and only if:
(i) e_i = Sum_{ j = 0..i } d_j d_{i-j} <= 9 for i = 0 .. 2k-1;
(ii) if P_n(X) = Sum_{i = 0..k } d_i X^i (so P_n(10) = n) then P_{n^2}(X) = P_n(X)^2;
(iii) R(n^2) = R(n)^2, where R(n) means the digit reversal of n;
(iv) (sum of digits of n)^2 = sum of digits of n^2.
This entry is a merging and reworking of earlier entries from Asher Auel, May 17 2001 and Amarnath Murthy, Aug 15 2005. Thanks to Andrew S. Plewe for suggesting that these sequences might be identical.
Also, numbers n in base 10 whose base 10 expansion of n^2 is the same as if n were interpreted in some base b>10 and n^2 also calculated in that base. - Andrew Silberman (sandrew(AT)math.upenn.edu), Oct 30 2006
The decimal expansion of a skinny number n may contain only 0's, 1's, 2's and 3's.
There may be at most one 3 and if there is a 3 then there can be no 2's. (Hence of course if there are any 2's then there can be no 3's.)
There is no limit to the number of 1's and 2's - consider for example Sum_{i=0..m} 10^{2^i} and 2*Sum_{i=0..m} 10^{2^i}.
These are necessary conditions, but are not sufficient (e.g., 131 is not skinny). (End)
There are fifty-five skinny numbers without a 0 digit, the greatest being a(5203) = 111111111. - Jason Zimba, Jul 05 2020
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
12 is a member as 12^2 = 144, digit reversal of 144 is 441 = 21^2.
13 is a member as 13 squared is 169 and sqrt(961) = 31.
113 is a member as 113^2 = 12769, reversal(12769) = 96721 = 311^2.
(Sum of digits of 13)^2 = 4^2 = 16 and sum of digits of 13^2 = sum of digits of 169 = 16.
10^k is in the sequence for all k >= 0, since reversal((10^k)^2) = 1 = (reversal(10^k))^2. - Ryan Propper, Sep 09 2005
|
|
MAPLE
|
rev:=proc(n) local nn, nnn: nn:=convert(n, base, 10): add(nn[nops(nn)+1-j]*10^(j-1), j=1..nops(nn)) end: a:=proc(n) if sqrt(rev(n^2))=rev(n) then n else fi end: seq(a(n), n=1..1200); # Emeric Deutsch, Mar 31 2007
f := []: for n from 1 to 1000 do if (convert(convert(n, base, 10), `+`))^2 = convert(convert(n^2, base, 10), `+`) then f := [op(f), n] fi; od; f; # Asher Auel
|
|
MATHEMATICA
|
r[n_] := FromDigits[Reverse[IntegerDigits[n]]]; Do[If[r[n]^2 == r[n^2], Print[n]], {n, 1, 10^4}] (* Ryan Propper, Sep 09 2005 *)
Select[Range[0, 1200], IntegerReverse[#^2]==IntegerReverse[#]^2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 02 2017 *)
|
|
PROG
|
(Haskell)
a061909 n = a061909_list !! (n-1)
a061909_list = filter (\x -> a004086 (x^2) == (a004086 x)^2) [0..]
(Python)
from itertools import count, islice, product
def sd(n): return sum(map(int, str(n)))
def ok(n): return sd(n**2) == sd(n)**2
def agen(): # generator of terms
yield from [0, 1, 2, 3]
for d in count(2):
for f in "123":
rset = "01" if f == "3" else "012" if f == "2" else "0123"
for r in product(rset, repeat=d-1):
t = int(f+"".join(r))
if ok(t): yield t
|
|
CROSSREFS
|
Cf. A007953, A004159, A061903, A061910, A129967, A129968, A129969, A129970, A129971, A123977, A159953, A169939.
The primes in this sequence are given by A085306.
Numbers n such that A067552(n) = 0.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A085305
|
|
Numbers such that first reversing digits and then squaring equals the result of first squaring and then reversing.
|
|
+10
8
|
|
|
0, 1, 2, 3, 11, 12, 13, 21, 22, 31, 101, 102, 103, 111, 112, 113, 121, 122, 201, 202, 211, 212, 221, 301, 311, 1001, 1002, 1003, 1011, 1012, 1013, 1021, 1022, 1031, 1101, 1102, 1103, 1111, 1112, 1113, 1121, 1122, 1201, 1202, 1211, 1212, 1301, 2001, 2002, 2011
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Only digits {0, 1, 2, 3} seem to arise.
Numbers (other than 0) that end in zero are excluded. - N. J. A. Sloane, Mar 20 2010
|
|
REFERENCES
|
David Wells, The Dictionary of Curious and Interesting Numbers. London: Penguin Books (1997): p. 124.
|
|
LINKS
|
|
|
FORMULA
|
Solutions to rev(x^2) = rev(x)^2.
|
|
EXAMPLE
|
n = 13 is a term because 31^2 = 961 = rev(169) = rev(13^2) = rev(rev(31)^2).
|
|
MATHEMATICA
|
rt[x_] := tn[Reverse[IntegerDigits[x]]] Do[s = rt[n^2]; s1=rt[n]^2; If[Equal[s, s1]&&!Equal[Mod[n, 10], 0], Print[{n, s, rt[s1]}]], {n, 0, 1000000}]
(* Second program: *)
Select[Range[0, 1999], Mod[#, 10] != 0 && FromDigits[Reverse[IntegerDigits[#^2]]] == FromDigits[Reverse[IntegerDigits[#]]]^2 &] (* Alonso del Arte, Oct 08 2012; corrected by Jean-François Alcover, Jan 11 2021 *)
|
|
PROG
|
a085305 n = a085305_list !! (n-1)
a085305_list = 0 : filter (\x -> x `mod` 10 > 0
&& a004086 (x^2) == (a004086 x)^2) [1..]
(Magma) [0] cat [ m: n in [1..1810] | Reverse(Intseq(m^2)) eq Intseq(Seqint(Reverse(Intseq(m)))^2) where m is n+Floor((n-1)/9) ]; // Bruno Berselli, Jul 08 2011
(PARI) isok(x) = (x==0) || ((x%10) && fromdigits(Vecrev(digits(x^2))) == fromdigits(Vecrev(digits(x)))^2); \\ Michel Marcus, Jan 11 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.007 seconds
|