Skip to main content
Commonmark migration
Source Link

#Mathematica 30 bytes

Mathematica 30 bytes

RealDigits[Pi,10,1,-#][[1,1]]&

f=%

f@0
f@1
f@2
f@3
f@10
f@100
f@599
f@760
f@1000
f@10000

1
4
1
5
8
8
2
4
3
5

#Mathematica 30 bytes

RealDigits[Pi,10,1,-#][[1,1]]&

f=%

f@0
f@1
f@2
f@3
f@10
f@100
f@599
f@760
f@1000
f@10000

1
4
1
5
8
8
2
4
3
5

Mathematica 30 bytes

RealDigits[Pi,10,1,-#][[1,1]]&

f=%

f@0
f@1
f@2
f@3
f@10
f@100
f@599
f@760
f@1000
f@10000

1
4
1
5
8
8
2
4
3
5

Post Undeleted by DavidC
fixed
Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105

#Mathematica 30 bytes

RealDigits[N[Pi,#+3]][[1,-2]]&

This should also work, but uses one-indexing:

RealDigits[Pi,10,1,-#][[1,1]]&

RealDigits[N[Pi, # + 3]][[1, -2]] &[100]f=%

(* 8 *)f@0

RealDigits[N[Pi, # + 3]][[1, -2]] &[10^7]f@1
f@2
(* 3 *)f@3
f@10
f@100
f@599
f@760
f@1000
f@10000

1
4
1
5
8
8
2
4
3
5

#Mathematica 30 bytes

RealDigits[N[Pi,#+3]][[1,-2]]&

This should also work, but uses one-indexing:

RealDigits[Pi,10,1,-#][[1,1]]&

RealDigits[N[Pi, # + 3]][[1, -2]] &[100]

(* 8 *)

RealDigits[N[Pi, # + 3]][[1, -2]] &[10^7]

(* 3 *)

#Mathematica 30 bytes

RealDigits[Pi,10,1,-#][[1,1]]&

f=%

f@0
f@1
f@2
f@3
f@10
f@100
f@599
f@760
f@1000
f@10000

1
4
1
5
8
8
2
4
3
5

Post Deleted by DavidC
added 2 characters in body
Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105

#Mathematica 30 bytes

RealDigits[N[Pi,#+3]][[1,-2]]&

This should also work, but uses one-indexing:

RealDigits[Pi,10,1,-#][[1,1]]&

RealDigits[N[Pi, # + 3]][[1, -2]] &[100]

(* 8 *)

RealDigits[N[Pi, # + 3]][[1, -2]] &[10^7]

(* 3 *)

#Mathematica 30 bytes

RealDigits[N[Pi,#+3]][[1,-2]]&

This should also work, but uses one-indexing:

RealDigits[Pi,10,1,-#][[1,1]]&

RealDigits[N[Pi, # + 3]][[1, -2]] &[100]

(* 8 *)

RealDigits[N[Pi, # + 3]][[1, -2]] &[10^7]

(* 3 *)

#Mathematica 30 bytes

RealDigits[N[Pi,#+3]][[1,-2]]&

This should also work, but uses one-indexing:

RealDigits[Pi,10,1,-#][[1,1]]&

RealDigits[N[Pi, # + 3]][[1, -2]] &[100]

(* 8 *)

RealDigits[N[Pi, # + 3]][[1, -2]] &[10^7]

(* 3 *)
added 89 characters in body
Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105
Loading
Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105
Loading