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-7 of 7 results.

A336519 Primes in Pi (variant of A336520): a(n) is the smallest prime factor of A090897(n) that does not appear in earlier terms of a, or 1, if no such factor exists.

Original entry on oeis.org

3, 2, 53, 7, 58979, 161923, 2643383, 1746893, 6971, 5, 17, 1499, 11, 1555077581737, 297707, 13, 37, 126541, 2130276389911155737, 1429, 71971, 383, 61, 1559, 29, 193, 12073, 698543, 157, 20289606809, 23687, 1249, 59, 2393, 251, 101, 15827173, 82351, 661
Offset: 1

Views

Author

Peter Luschny, Aug 21 2020

Keywords

Comments

Inspired by a comment of Mario Cortés in A090897, who suggests that 1 might not appear in this sequence.

Examples

			[ 1] 3,          {3}                  -> 3;
[ 2] 14,         {2, 7}               -> 2;
[ 3] 159,        {3, 53}              -> 53;
[ 4] 2653,       {7, 379}             -> 7;
[ 5] 58979,      {58979}              -> 58979;
[ 6] 323846,     {2, 161923}          -> 161923;
[ 7] 2643383,    {2643383}            -> 2643383;
[ 8] 27950288,   {2, 1746893}         -> 1746893;
[ 9] 419716939,  {6971, 60209}        -> 6971;
[10] 9375105820, {2, 5, 1163, 403057} -> 5.
		

Crossrefs

Programs

  • Maple
    aList := proc(len) local p, R, spl; R := [];
    spl := L -> [seq([seq(L[i], i=1 + n*(n+1)/2..(n+1)*(n+2)/2)], n=0..len)]:
    ListTools:-Reverse(convert(floor(Pi*10^((len+1)*(len+2)/2)), base, 10)):
    map(`@`(parse,cat,op), spl(%)); map(NumberTheory:-PrimeFactors, %);
    for p in % do ListTools:-SelectFirst(p -> evalb(not p in R), p);
    R := [op(R), `if`(%=NULL, 1, %)] od end: aList(30);
  • Mathematica
    Block[{nn = 38, s}, s = RealDigits[Pi, 10, (# + 1) (# + 2)/2 &@ nn][[1]]; Nest[Function[{a, n}, Append[a, SelectFirst[FactorInteger[FromDigits@ s[[1 + n (n + 1)/2 ;; (n + 1) (n + 2)/2 ]]][[All, 1]], FreeQ[a, #] &] /. k_ /; MissingQ@ k -> 1]] @@ {#, Length@ #} &, {}, nn + 1]] (* Michael De Vlieger, Aug 21 2020 *)
  • SageMath
    def Select(item, Selected):
        return next((x for x in item if not (x in Selected)), 1)
    def PiPart(n):
        return floor(pi * 10^(n * (n + 1) // 2 - 1)) % 10^n
    def A336519List(len):
        prev = []
        for n in range(1, len + 1):
            p = prime_factors(PiPart(n))
            prev.append(Select(p, prev))
        return prev
    print(A336519List(39))

A336520 Primes in Pi: a(n) is the smallest prime factor of A090897(n) that does not appear in earlier terms of A090897, or 1, if no such factor exists.

Original entry on oeis.org

3, 2, 53, 379, 58979, 161923, 2643383, 1746893, 6971, 5, 17, 1499, 11, 1555077581737, 297707, 4733, 37, 126541, 2130276389911155737, 1429, 71971, 383, 61, 1559, 29, 193, 12073, 698543, 157, 20289606809, 23687, 1249, 59, 2393, 251, 101, 15827173, 82351, 661
Offset: 1

Views

Author

Peter Luschny, Aug 22 2020

Keywords

Comments

Inspired by a comment of Mario Cortés in A090897, who suggests that 1 might not appear in this sequence.
Differs from A336519 for n = 4, 16, 73, 83, 90, ....
a(n) is not 1 for the first 2000 terms. We can prove that a(n) has a prime factor p that does not divide LCM(A090897(1), ..., A090897(n-1)) without using prime number factorization. The method is explained in the link below. - David A. Corneth, Aug 22 2020

Examples

			[ 1] 3,          {3}                  -> 3;
[ 2] 14,         {2, 7}               -> 2;
[ 3] 159,        {3, 53}              -> 53;
[ 4] 2653,       {7, 379}             -> 379;
[ 5] 58979,      {58979}              -> 58979;
[ 6] 323846,     {2, 161923}          -> 161923;
[ 7] 2643383,    {2643383}            -> 2643383;
[ 8] 27950288,   {2, 1746893}         -> 1746893;
[ 9] 419716939,  {6971, 60209}        -> 6971;
[10] 9375105820, {2, 5, 1163, 403057} -> 5.
		

Crossrefs

Cf. A090897, A336519 (variant).

Programs

  • SageMath
    def Select(item, Selected):
        return next((x for x in item if not (x in Selected)), 1)
    def PiPart(n):
        return floor(pi * 10^(n * (n + 1) // 2 - 1)) % 10^n
    def A336520List(len):
        prev = []; ret = []
        for n in range(1, len + 1):
            p = prime_factors(PiPart(n))
            ret.append(Select(p, prev))
            prev.extend(p)
        return ret
    print(A336520List(39))
    # Query function of David A. Corneth to determine if a(n) is prime.
    def LcmPiPart(n):
        return lcm([PiPart(n) for n in (1..n)])
    def is_an_prime(n):
        lcmpi = LcmPiPart(n - 1)
        lm, m = 1, PiPart(n)
        while lm != m:
            lm, m = m, lcm(lcmpi, m) // lcmpi
        return m > 1

A081368 Next n digits of e, base of the natural logarithms.

Original entry on oeis.org

2, 71, 828, 1828, 45904, 5235360, 2874713, 52662497, 757247093, 6999595749, 66967627724, 76630353547, 5945713821785, 25166427427466, 391932003059921, 8174135966290435, 72900334295260595, 630738132328627943
Offset: 1

Views

Author

Michael Joseph Halm, Apr 20 2003

Keywords

Comments

Any zeros that immediately follow a term of this sequence are appended to that term of the sequence.

Examples

			a(2) = 71 because the second and third digits of e are 7 and 1.
		

References

  • M. J. Halm, More Sequences, Mpossibilities 83, April 2003.
  • C. A. Pickover, Wonders of Numbers, p. 302
  • C. Pickover, Mazes for the Mind, St. Martin's Press, NY, 1992, p. 350.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.

Crossrefs

A086639 Write decimal expansion of Pi in triangular form; sequence gives left edge.

Original entry on oeis.org

3, 1, 1, 2, 5, 3, 2, 2, 4, 9, 9, 7, 8, 3, 8, 7, 2, 1, 8, 9, 5, 3, 6, 6, 3, 5, 7, 6, 2, 2, 9, 9, 4, 0, 4, 2, 3, 0, 4, 1, 6, 7, 8, 9, 9, 1, 2, 3, 0, 1, 7, 2, 2, 4, 7, 8, 3, 1, 8, 3, 0, 2, 7, 9, 1, 6, 2, 2, 6, 7, 6, 8, 1, 5, 7, 3, 7, 7, 2, 4, 9, 3, 2, 1, 9, 8, 9, 1, 2, 7, 7, 9, 4, 0, 9, 2, 9, 8, 4, 9, 9, 2, 0, 7, 0
Offset: 1

Views

Author

Cino Hilliard, Jul 24 2003

Keywords

Comments

In the second formula, "if" can most probably be strengthened to "if and only if": Indeed, a(n) = 0 can be equal to A000030(A090897(n)) only if A090897(n) = 0, i.e., there would be a string of n consecutive zeros in the decimals of Pi from position T(n-1)+1 to position T(n). The probability that this happens appears to be zero. (Notice how A096764(n), first occurrence of n consecutive zeros, grows incredibly much faster than T(n).) Maybe this could be proved considering, e.g., a continued fraction expansion of Pi whose coefficients follow some pattern of moderate growth (as e.g. in A046126), while a very long string of zeros in the decimal expansion would mean that it is exceptionally close to the rational number given by the truncation. - M. F. Hasler, Jan 06 2023

Examples

			Triangle is
  3
  14
  159
  2653
  58979
  323846
  2643383
  27950288
  419716939
  9375105820
a(34) = 0 because in the decimals of Pi there is a 0 at position 562, following the triangular number A000217(33) = 561, i.e., in the first column of the 34th row in the above triangle. - _Michel Marcus_ and _M. F. Hasler_, Jan 06 2023
		

Crossrefs

Programs

  • Mathematica
    pi = RealDigits[Pi, 10, 5461][[1]]; Table[ pi[[n(n + 1)/2 + 1]], {n, 0, 104}]
    Module[{nn=110,pid},pid=RealDigits[Pi,10,(nn(nn+1))/2][[1]];TakeList[ pid,Range[ nn]]][[;;,1]] (* Harvey P. Dale, Mar 06 2023 *)

Formula

a(n) = A000796(1-n(n-1)/2). - M. F. Hasler, Oct 20 2011
a(n) = A000030(A090897(n)) if (and probably only if) a(n) is nonzero. - Michel Marcus and M. F. Hasler, Jan 06 2023

Extensions

Edited by Robert G. Wilson v, Jul 26 2003

A093473 a(n) = the next n digits of phi, the golden ratio.

Original entry on oeis.org

1, 61, 803, 3988, 74989, 484820, 4586834, 36563811, 772030917, 9805762862, 13544862270, 526046281890, 2449707207204, 18939113748475, 408807538689175, 2126633862223536, 93179318006076672, 635443338908659593
Offset: 1

Views

Author

Michael Joseph Halm, May 13 2004

Keywords

Crossrefs

Programs

  • Mathematica
    With[{phi=RealDigits[GoldenRatio,10,500][[1]]},FromDigits/@Table[Take[ phi,{n (n-1)/2+1,(n(n+1))/2}],{n,25}]] (* Harvey P. Dale, Dec 24 2011 *)
  • PARI
    { default(realprecision, 20180); x = (1 + sqrt(5))/2; for (n=1, 200, d=floor(x); x=(x-d)*10^(n+1); write("b093473.txt", n, " ", d)); } \\ Harry J. Smith, Jun 19 2009

A136517 a(0) = 3; for n > 0, break up decimal expansion of Pi into chunks of increasing lengths; leading zeros are not printed.

Original entry on oeis.org

3, 1, 41, 592, 6535, 89793, 238462, 6433832, 79502884, 197169399, 3751058209, 74944592307, 816406286208, 9986280348253, 42117067982148, 86513282306647, 938446095505822, 31725359408128481, 117450284102701938, 5211055596446229489
Offset: 0

Views

Author

N. J. A. Sloane, Apr 21 2008

Keywords

References

  • Sylvia Nasar, A Beautiful Mind (1998), p. 210.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 64.

Crossrefs

Programs

  • Maple
    with(StringTools): lim:=23: s:=convert(evalf[lim^2](Pi-3),string): printf("3, "): for n from 1 to lim do printf("%d, ",parse(SubString(s,(n-1)*n/2+2..n*(n+1)/2+1))); od: # Nathaniel Johnston, May 08 2011
  • Mathematica
    Join[{3},FromDigits/@With[{p=RealDigits[Pi,10,220][[1]]},Table[ Take[ p, {(n(n-1))/2+2,(n(n-1))/2+1+n}],{n,20}]]] (* Harvey P. Dale, Aug 20 2011 *)

Extensions

Extended by Nathaniel Johnston, May 08 2011

A267325 Next n digits of sqrt(2).

Original entry on oeis.org

1, 41, 421, 3562, 37309, 504880, 1688724, 20969807, 856967187, 5376948073, 17667973799, 73247846210, 7038850387534, 32764157273501, 384623091229702, 4924836055850737, 21264412149709993, 583141322266592750, 5592755799950501152, 78206057147010955997
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 13 2016

Keywords

Examples

			a(2) = 41 because the second and third digits of sqrt(2) are 4 and 1.
		

Crossrefs

Programs

  • Magma
    [Floor(Sqrt(2)*10^(n*(n + 1)/2 - 1)) mod (10^n): n in [1..30]]; // Vincenzo Librandi, Feb 15 2016
    
  • Mathematica
    Table[Mod[Floor[Sqrt[2] 10^(n ((n + 1)/2) - 1)], 10^n], {n, 1, 20}]
    Table[Floor[10^(-1 + (n (1 + n))/2) Sqrt[2]] + Ceiling[-(Floor[10^(-1 + (n (1 + n))/2) Sqrt[2]]/10^n)] 10^n, {n, 1, 20}]
    With[{x=20},FromDigits/@TakeList[RealDigits[Sqrt[2],10,(x(x+1))/2] [[1]], Range[x]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 04 2019 *)
  • PARI
    a(n) = lift(Mod(floor(sqrt(2)*10^(n*(n + 1)/2 - 1)), 10^n)); \\ G. C. Greubel, Oct 07 2018

Formula

a(n) = floor(sqrt(2)*10^(n*(n + 1)/2 - 1)) mod (10^n).
Showing 1-7 of 7 results.