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.

Showing 1-3 of 3 results.

A128050 Position of start of first occurrence of prime(n) after the decimal point in expansion of golden ratio phi.

Original entry on oeis.org

19, 5, 22, 10, 34, 55, 35, 188, 131, 174, 137, 98, 90, 27, 102, 111, 166, 1, 150, 217, 479, 44, 25, 13, 81, 458, 1242, 744, 563, 96, 1602, 186, 97, 995, 259, 939, 1999, 1204, 641, 1191, 43, 833, 1682, 2833, 2708, 188, 647, 130, 62, 734, 2337, 1106, 307, 1156, 2532
Offset: 1

Views

Author

Gregory Allen, Feb 13 2007

Keywords

Examples

			Golden ratio phi = 1.6180339887498948482045868343656381177... (see A001622).
First occurrence of prime(1) = 2 is at the 19th digit after the decimal point, hence a(1) = 19.
First occurrence of prime(5) = 11 starts at the 34th digit after the decimal point, hence a(5) = 34.
		

Crossrefs

Programs

  • Magma
    k:=3000; R := RealField(k); [ Position(IntegerToString(Round(10^k*(-1 + (Sqrt(elt)+1) / elt))), IntegerToString(NthPrime(n))) : n in [1..55] ]; /* Klaus Brockhaus, Feb 15 2007 */
  • Mathematica
    Module[{p = Rest[First[RealDigits[GoldenRatio, 10, 10^4]]], n = 0, a}, Reap[While[(a = SequencePosition[p, IntegerDigits[Prime[++n]], 1]) != {}, Sow[a[[1, 1]]]]][[2, 1]]] (* Paolo Xausa, Aug 01 2024 *)

Extensions

Edited, corrected and extended by Klaus Brockhaus, Feb 15 2007

A309343 Position of start of first occurrence of palindromic prime(n) after the decimal point in expansion of Pi.

Original entry on oeis.org

6, 9, 4, 13, 94, 852, 1096, 393, 728, 1944, 858, 934, 5229, 25, 405, 631, 647, 1259, 416, 1853, 78246, 182558, 13736, 53100, 38835, 58726, 54516, 97930, 8827, 11000, 69516, 5795, 183115, 161674, 320336, 41934, 55891, 71399, 65195, 189109, 21045, 49012
Offset: 1

Views

Author

Hauke Löffler, Jul 24 2019

Keywords

Examples

			First occurrence of palindromic prime(5) = 11 starts at the 94th digit after the decimal point, hence a(5) = 94.
		

Crossrefs

Programs

  • SageMath
    def postionInPi(n):
      return str(N(pi, 2000000))[1:].find(str(n))
    [ postionInPi(i) for i in A002385[0:200] ]

A341442 a(n) is the position of the start of the first occurrence of prime(n) after the decimal point in the expansion of e.

Original entry on oeis.org

4, 17, 11, 1, 200, 27, 88, 108, 16, 131, 189, 270, 124, 134, 25, 18, 11, 242, 59, 1, 157, 168, 205, 221, 35, 195, 941, 283, 1748, 355, 370, 4604, 1574, 1998, 223, 413, 201, 483, 232, 599, 2875, 120, 1382, 108, 607, 1067, 426, 2494, 1329, 517, 178, 574, 2133
Offset: 1

Views

Author

Gregory Allen, Feb 11 2021

Keywords

Examples

			The first position at which prime(1)=2 occurs to the right of the decimal point in e=2.71828... is the 4th digit after the decimal point, so a(1)=4.
		

Crossrefs

Programs

  • Mathematica
    en=Characters[ToString@N[E,10000]];
    For[x=1,x<=100,x++,Print["x=",x," ",prn=Prime[x]," ",pos=First[SequencePosition[en,Characters[ToString[prn]]]-2]]]

Formula

a(n) = A078197(prime(n)). - Rémy Sigrist, Feb 12 2021
Showing 1-3 of 3 results.