login
"Madonna's Sequence": add 1 (mod 10) to each digit of Pi.
3

%I #23 Jul 05 2022 11:47:20

%S 4,2,5,2,6,0,3,7,6,4,6,9,0,8,0,4,3,4,9,5,7,3,7,5,4,4,9,4,3,8,0,6,1,3,

%T 9,9,5,2,0,8,2,7,0,4,0,0,4,8,6,2,1,6,9,3,1,0,8,5,0,5,5,6,0,3,4,1,8,9,

%U 2,7,5,1,7,3,9,7,3,1,9,0,0,9,7,3,9,1,4,5,9,3,6,4,5,3,2,2,8,1,7,8,0,9,3,2,5

%N "Madonna's Sequence": add 1 (mod 10) to each digit of Pi.

%D Clifford Pickover, Wonders of Numbers, Oxford University Press, 2001, p. 194.

%H C. A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," <a href="http://www.zentralblatt-math.org/zmath/en/search/?q=an:0983.00008&amp;format=complete">Zentralblatt review</a>

%e 4.25260376469080434957375449438...

%p Digits := 300: with(numtheory): it := evalf(Pi/10, 300)-floor(evalf(Pi/10, 300)): for i from 1 to 300 do printf(`%d,`,floor(10*it)+1 mod 10): it := 10*it-floor(10*it): od:

%t Mod[# + 1, 10]&/@RealDigits[Pi, 10, 120][[1]] (* _Harvey P. Dale_, Jul 19 2011 *)

%o (Python)

%o from sympy import S

%o def alist(nn): return [4]+[(1+int(d))%10 for d in str(S.Pi.n(nn+2))[2:nn+1]]

%o print(alist(105)) # _Michael S. Branicky_, Apr 02 2021

%K easy,nonn,base

%O 1,1

%A _Jason Earls_, Feb 25 2001

%E More terms from _James A. Sellers_, Feb 26 2001

%E Offset set to 1 by _Alois P. Heinz_, Jul 05 2022