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!)
A182211 The number of integers k < 10^n such that both k and k^3 mod 10^n have all odd decimal digits. 0

%I

%S 5,25,62,151,381,833,2163,5291,13317,33519,85179,213083,539212,

%T 1344272,3358571

%N The number of integers k < 10^n such that both k and k^3 mod 10^n have all odd decimal digits.

%C Inspired by a discussion on the math-fun list on April 18, 2012 by _James R. Buddenhagen_.

%o (Haskell)

%o oddDigits 0 = True

%o oddDigits n = let (q,r) = quotRem n 10

%o ..............in (odd r) && oddDigits q

%o oddSet 0 = []

%o oddSet 1 = [1,3..9]

%o oddSet k = [n | i <- [1,3..9], x <- oddSet (k-1), let n = i*10^(k-1) + x,

%o ...............oddDigits((n^3) `mod` 10^k)]

%o main = putStrLn $ map (length . oddSet) [1..]

%Y Cf. A085597 (n such that both n and n^3 have all odd digits).

%K nonn,base

%O 1,1

%A _Victor S. Miller_, Apr 18 2012

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 February 7 10:28 EST 2023. Contains 360115 sequences. (Running on oeis4.)