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!)
A076493 Number of common (distinct) decimal digits of n and n^2. 8

%I #12 Oct 15 2013 22:31:34

%S 1,1,0,0,0,1,1,0,0,0,2,1,1,1,1,1,1,0,0,1,1,1,0,1,0,2,1,2,1,0,1,1,1,0,

%T 0,1,1,1,0,0,1,1,1,1,0,1,1,0,1,1,2,1,1,0,0,1,1,0,0,0,2,1,0,2,2,1,1,0,

%U 1,1,1,1,0,1,2,1,2,0,1,0,1,1,1,1,0,1,1,1,0,1,1,1,0,1,0,2,2,1,1,1,2,2,2,2,2,3,2,1,1,1

%N Number of common (distinct) decimal digits of n and n^2.

%C a(A029783(n)) = 0, a(A189056(n)) > 0; 0 <= a(n) <= 10, see example for first occurrences. [_Reinhard Zumkeller_, Apr 16 2011]

%H Reinhard Zumkeller, <a href="/A076493/b076493.txt">Table of n, a(n) for n = 0..10000</a>

%e a(2) = #{} = 0: 2^2 = 4;

%e a(0) = #{0} = 1: 0^2 = 0;

%e a(10) = #{0,1} = 2: 10^2 = 100;

%e a(105) = #{0,1,5} = 3: 105^2 = 11025;

%e a(1025) = #{0,1,2,5} = 4: 1025^2 = 1050625;

%e a(10245) = #{0,1,2,4,5} = 5: 10245^2 = 104960025;

%e a(102384) = #{0,1,2,3,4,8} = 6: 102384^2 = 10482483456;

%e a(1023456789) = #{0 .. 9} = 10: 1023456789^2 = 1047463798950190521.

%t Table[Length[Intersection[IntegerDigits[n], IntegerDigits[n^2]]], {n, 1, 100}]

%o (Haskell)

%o import Data.List (intersect, nub)

%o import Data.Function (on)

%o a076493 n = length $ (intersect `on` nub . show) n (n^2)

%o -- _Reinhard Zumkeller_, Apr 16 2011

%Y Cf. A006880, A076489-A076491.

%Y Cf. A000290, A043537.

%K base,nonn

%O 0,11

%A _Labos Elemer_, Oct 21 2002

%E Initial 1 added and offset adjusted by _Reinhard Zumkeller_, Apr 16 2011

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 23 12:08 EDT 2024. Contains 371912 sequences. (Running on oeis4.)