cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-14 of 14 results.

A053746 Positions of '2's in the decimal expansion of Pi, where positions 1, 2, 3, ... correspond to digits 3, 1, 4, ...

Original entry on oeis.org

7, 17, 22, 29, 34, 54, 64, 74, 77, 84, 90, 94, 103, 113, 115, 136, 137, 141, 150, 161, 166, 174, 186, 187, 204, 222, 230, 242, 245, 261, 276, 281, 290, 293, 299, 303, 327, 330, 334, 336, 338, 355, 375, 381, 407
Offset: 1

Views

Author

Simon Plouffe, Feb 20 2000

Keywords

Comments

See A037001 for the variant where digits 3, 1, 4, ... correspond to positions 0, 1, 2, ... - M. F. Hasler, Jul 28 2024

Examples

			Pi = 3.1415926... where the first '2' occurs as the 7th digit.
		

Crossrefs

Cf. A000796 (decimal expansion (or digits) of Pi).
Cf. A037001 (= a(n) - 1: the same with different offset).
Cf. A053745 - A053753 (similar for digits 1 through 9).
Cf. A035117 (first occurrence of at least n '1's), A050281 (n '2's), A050282, A050283, A050284, A050286, A050287, A048940 (n '9's).
Cf. A096755 (first occurrence of exactly n '1's), A096756, A096757, A096758, A096759, A096760, A096761, A096762, A096763 (exactly n '9's), A050279 (exactly n '0's).
Cf. A121280 = A068987 - 1: position of "123...n" in Pi's decimals.
Cf. A176341: first occurrence of n in Pi's digits.
Cf. A088566 (primes in this sequence).

Programs

  • Mathematica
    Flatten[Position[RealDigits[Pi, 10, 1000][[1]], 2]] (* Vincenzo Librandi, Oct 07 2013 *)
  • PARI
    A053746_upto(N=999)={localprec(N+20); select(d->d==2, digits(Pi\10^-N), 1)} \\ M. F. Hasler, Jul 28 2024

Formula

a(n) = A037001(n) + 1. - Georg Fischer, May 31 2021

Extensions

Changed offset from 0 to 1 by Vincenzo Librandi, Oct 07 2013

A307581 Position of the first permutation of { 0 .. n-1 } occurring in the digits of Pi written in base n.

Original entry on oeis.org

0, 2, 0, 6, 15, 5, 371, 742, 60, 787
Offset: 2

Views

Author

M. F. Hasler, Apr 15 2019

Keywords

Comments

"The first permutation of {0 .. n-1}" means the first string of n distinct digits.
"Position" means the index of the digit where this string begins, where index = p means the digit corresponding to n^-p: e.g., the first digit after the decimal point would have index 1.
By inspection, a(12) > 1000. - Alvin Hoover Belt, Mar 17 2021

Examples

			Pi written in base 2 is 11.0...[2] so "10" occurring at position a(2) = 0 (digits corresponding to 2^0 and 2^-1) is the first permutation of the digits 01 to occur in the digits of Pi written in base 2.
Pi written in base 3 is 10.0102...[3], so "102" occurring at position a(3) = 2 (the string starts at the digit corresponding to 3^-2) is the first permutation of digits 012 to occur in the digits of Pi written in base 3.
Pi written in base 4 is 3.021...[4], so "3021" occurring at position a(4) = 0 (the string starts at the digit corresponding to 4^0) is the first permutation of digits 0123 to occur in the digits of Pi written in base 4.
Pi written in base 5 is 3.0323221430...[5], so "21430" occurring at position a(5) = 6 (the string starts at the digit corresponding to 5^-6) is the first permutation of digits 01234 to occur in the digits of Pi written in base 5.
Pi = 3.141592653589793238462643383279502884197169399375105820974944592307816... (in base 10) has the first string of 10 distinct digits, "4592307816", starting at position a(10) = 60.
		

Crossrefs

Cf. A307582 (start of first occurrence of (0, ..., n-1) in digits of Pi in base n).
Cf. A307583 (start of last permutation of {0 .. n-1} not to occur earlier, in base-n digits of Pi).

Programs

  • PARI
    A307581(n,x=Pi,m=n^n)=for(k=0,oo,#Set(d=digits(x\n^-k%m,n))>=n && (#Set(d)==n||vecsort(d)==[1..n-1]) && return([k-n+1,digits(x\n^-k,n)])) \\ Returns position and the digits up to there. Ensure sufficient realprecision (\p): an error should occur if a suitable permutation of digits is not found early enough, but in case of results near the limit of precision, it is suggested to double check (by increasing the precision further) that the relevant digits are all correct.

Formula

a(n) <= A307582(n) <= A307583(n).

A307582 Position of the first occurrence of (0, 1, ..., n-1) in the digits of Pi written in base n.

Original entry on oeis.org

2, 7, 188, 2264, 27931, 110808, 23489363, 97438020
Offset: 2

Views

Author

M. F. Hasler, Apr 15 2019

Keywords

Comments

Position refers to the digit where there required sequence (0, ..., n-1) starts. Position = k means the digit '0' occurs as digit corresponding to the weight n-^k (and thereafter, the digit '1' will correspond to n^-(k+1) etc): e.g., the first digit after the decimal point has position 1.

Examples

			Pi written in base 2 is 11.001...[2], so the first "01" occurs at position a(2) = 2.
Pi written in base 3 is 10.010211012...[3], we see that the first occurrence of the string "012" is at position a(3) = 7.
Pi written in base 4 is 3.02100333...[4]; the string of digits "0123" does not occur until position a(4) = 188.
		

Crossrefs

Cf. A307581 (first occurrence of any permutation of 0 .. n-1, in base-n digits of Pi).
Cf. A307583 (start of last permutation of {0 .. n-1} not to occur earlier, in base-n digits of Pi).
Cf. A068987 (occurrence of 123...n in decimal digits of Pi), A121280.

Programs

  • PARI
    A307582(n,x=Pi,m=Mod(sum(i=1,n-1,i*n^(n-1-i)),n^n))={for(k=0,oo,x\n^-k==m&&return(k-n+1))} \\ Ensure sufficient precision of the argument x = Pi.

Formula

A307581(n) <= a(n) <= A307583(n).

Extensions

a(7)-a(9) from Chai Wah Wu, Apr 07 2020

A307583 Position where the last of all n! permutations of { 0 .. n-1 } occurs in the digits of Pi written in base n.

Original entry on oeis.org

2, 82, 961, 15136
Offset: 2

Views

Author

M. F. Hasler, Apr 15 2019

Keywords

Comments

By "permutation of { 0 .. n-1 }" we mean a string of n distinct digits. "The last" means the permutation which occurs for the first time later than all other permutations.
Position = k means that the string starts with the digit corresponding to the weight n^-k; e.g., the first digit after the decimal point has position 1.

Examples

			Pi written in base 2 is 11.001...[2], so the first "10" occurs at position 0 (starting with the digit of units) and "01" occurs later at position a(2) = 2.
Pi written in base 3 is 10.010211012...[3], we see that the first permutation of 0..2 to appear is "102", at position 2; then "021" at position 3, then "012" at position 7, then "201" at position 12, then "120" at position 39, and finally "210", the last partition not occurring earlier, at position 82 = a(3).
Pi written in base 4 is 3.02100333...[4]; the first permutation of 0..3 is "3012" at position 0 (starting at units digit '3'), the next distinct permutation to occur is "2031" at position 27 etc.; the last permutation not to occur earlier is "2310" at position 961 = a(4).
		

Crossrefs

Cf. A307581 (first start of any permutation of 0 .. n-1 in base-n digits of Pi).
Cf. A307582 (first occurrence of "01...(n-1)" in digits of Pi written in base n).
Cf. A068987 (occurrence of 123...n in decimal digits of Pi), A121280.

Programs

  • PARI
    A307583(n,x=Pi,m=n^n,S=[])={for(k=n-2,oo, #Set(d=digits(x\n^-k%m,n)) < n-1 && next; #Set(d)==n || vecsort(d)==[1..n-1] || next; setsearch(S,d) && next; printf("%d: %d, ",k-n+1,Vec(d,-n));S=setunion(S,[d]);#S==n!&&return(k-n+1))}
Previous Showing 11-14 of 14 results.