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.

User: Talha Ali

Talha Ali's wiki page.

Talha Ali has authored 10 sequences.

A341046 a(n) is the smallest k such that the fractional part of the decimal expansion of k*Pi begins with n zeros.

Original entry on oeis.org

1, 36, 106, 29486, 32876, 66317, 1360120, 22060516, 78256779, 1151791169, 6701487259, 6701487259, 1142027682075, 2851718461558, 91822653867264, 136308121570117, 1952799169684491, 21208174623389167, 842468587426513207, 842468587426513207, 84383735478118508040
Offset: 0

Author

Talha Ali, Feb 04 2021

Keywords

Examples

			a(0)=1 because Pi*1=3.1415... has 0 zeros at the start of the fractional part of the decimal expansion, and 1 is the smallest positive integer that has this property.
a(1)=36 because Pi*36=113.09733... has 1 zero, and 36 is the smallest positive integer that has this property.
a(2)=106 because Pi*106=333.00882128... has 2 zeros, and 106 is the smallest positive integer that has this property.
From _Jon E. Schoenfield_, Feb 05 2021: (Start)
For each term a(n), the integer part of the corresponding product Pi*a(n) is A341047(n). Terms and their corresponding untruncated products begin as follows:
.
   n       a(n)                 Pi*a(n)
  --  -------------  ------------------------------
   0              1              3.1415926535897...
   1             36            113.0973355292325...
   2            106            333.0088212805180...
   3          29486          92633.0009837486434...
   4          32876         103283.0000794180425...
   5          66317         208341.0000081143181...
   6        1360120        4272943.0000005495794...
   7       22060516       69305155.0000000911737...
   8       78256779      245850922.0000000061180...
   9     1151791169     3618458675.0000000005971...
  10     6701487259    21053343141.0000000000017...
  11     6701487259    21053343141.0000000000017...
  12  1142027682075  3587785776203.0000000000003...
.
a(10) = 6701487259 because no multiple of Pi less than the product 6701487259*Pi = 21053343141.0000000000017... has a fractional part whose first 10 digits after the decimal point are all zeros, but that product does.
Note, however, that that product's 11th digit after the decimal point is also a zero; thus, a(11) = a(10). Presumably, a similar situation occurs infinitely many times; a(n) = a(n-1) at n = 11, 19, 39, 41, 74, 156, 183, 217, 218, 219, 220, 247, .... The consecutive integers 217..220 are in this list because a(220)=a(219)=a(218)=a(217)=a(216).
(End)
		

Crossrefs

Programs

  • Mathematica
    A341046[n_] := Module[{m = 1, i = 0}, While[i < n + 1, i = Abs[Floor[Log[10, Abs[FractionalPart[N[Pi*m]]]]]]; m++]; m - 1]; Table[A341046[n], {n, 0, 7}] (* Robert P. P. McKone, Feb 04 2021 *)

Extensions

a(6)-a(8) from Metin Sariyar, Feb 04 2021
More terms from Jon E. Schoenfield, Feb 05 2021

A341047 a(n) is the integer part of the smallest multiple of Pi whose fractional part begins with n 0's after the decimal point.

Original entry on oeis.org

3, 113, 333, 92633, 103283, 208341, 4272943, 69305155, 245850922, 3618458675, 21053343141, 21053343141, 3587785776203, 8958937768937, 288469374822515, 428224593349304, 6134899525417045, 66627445592888887, 2646693125139304345, 2646693125139304345
Offset: 0

Author

Talha Ali, Feb 04 2021

Keywords

Examples

			a(0)=3 as Pi*1=3.1415... is the smallest multiple of Pi that has zero 0's immediately after the decimal point, and 3 is the integer part.
a(1)=113 as Pi*36=113.09733... is the smallest multiple of Pi that has one 0 immediately after the decimal point, and 133 is the integer part.
a(2)=333 as Pi*106=333.0088212... is the smallest multiple of Pi that has two 0's immediately after the decimal point, and 333 is the integer part.
		

Crossrefs

Programs

  • Magma
    See A341046.
  • Mathematica
    Table[s=t=0;While[t<=k,t=Abs@Floor@Log[10,Abs@FractionalPart@N[Pi*++s]]];IntegerPart[s*Pi],{k,0,6}] (* Giorgos Kalogeropoulos, Mar 31 2021 *)

Formula

a(n) = floor(Pi*A341046(n)).

Extensions

a(6)-a(8) from Metin Sariyar, Feb 04 2021
More terms from Jon E. Schoenfield, Feb 05 2021

A276498 Number of trials T of an event that occurs with probability 1-1/n that must be repeated consecutively so that the probability that the event occurs on all T trials (i.e., (1-1/n)^T) is minimally higher than 1/n.

Original entry on oeis.org

1, 3, 5, 7, 10, 13, 16, 19, 22, 25, 29, 32, 36, 39, 43, 47, 51, 54, 58, 62, 66, 71, 75, 79, 83, 87, 92, 96, 100, 105, 109, 114, 118, 123, 127, 132, 136, 141, 146, 150, 155, 160, 165, 169, 174, 179, 184, 189, 194, 199, 203, 208, 213, 218, 223, 228, 233
Offset: 2

Author

Talha Ali, Sep 05 2016

Keywords

Examples

			a(20) = round(log(1/20)/log(1-1/20)) = round(log(0.05)/log(0.95)) = round(58.4...) = 58.
If a phenomenon P occurs with a 95% probability on any given trial, how many trials T must be performed so that the probability that P occurs on all T trials reduces to 5%? 0.95^T = 0.05 => T = log(0.05)/log(0.95) = 58.4... = 58 (rounded).
		

Programs

Formula

a(n) = round(log(1/n)/log(1-1/n)).
a(n) = n log n - (log n)/2 + O(1). - Charles R Greathouse IV, Sep 06 2016

Extensions

Name and Example edited by Jon E. Schoenfield, Jul 16 2017

A248504 Least number k > 0 such that n^k contains 666 in its decimal representation, or 0 if no such k exists.

Original entry on oeis.org

0, 157, 34, 96, 102, 18, 70, 64, 17, 0, 42, 41, 25, 44, 30, 48, 16, 97, 30, 157, 50, 33, 15, 35, 51, 12, 35, 10, 34, 34, 34, 44, 44, 30, 47, 9, 20, 46, 23, 96, 33, 13, 42, 32, 39, 17, 8, 27, 35, 102, 22, 42, 80, 55, 28, 55, 38, 19, 48, 18, 74, 15, 31, 32, 37
Offset: 1

Author

Talha Ali, Dec 01 2014

Keywords

Comments

a(n) <= a(2) = 157 for all n <= 10^5. Is there any n for which a(n) > 157? - Robert Israel, Dec 01 2014

Examples

			a(2)=157 because 2^157=182687704666362864775460604089535377456991567872 contains '666' (see A007356).
a(3)=34 because 3^34=16677181699666568 contains '666' and belongs to A051003.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
    local k;
    if n = 10^ilog10(n) then return 0 fi;
    for k from 1 do
      if StringTools[Search]("666",sprintf("%d",n^k)) <> 0 then return k fi
    od
    end proc;
    seq(f(n), n=1..1000); # Robert Israel, Dec 01 2014
  • Mathematica
    A248504[n_] := If[IntegerQ[Log10[n]], 0, Block[{k = 0}, While[StringFreeQ[IntegerString[n^++k], "666"]]; k]];
    Array[A248504, 100] (* Paolo Xausa, Apr 08 2024 *)
  • PARI
    isok(n) = {d = digits(n); for (i=1, #d-3, if ((d[i] == 6) && (d[i+1]==6) && (d[i+2]==6), return(1));); return (0);}
    a(n) = {if ((n==1) || (n==10) || (ispower(n,,&p) && (p==10)), return(0)); k = 1; while (! isok(n^k), k++); k;} \\ Michel Marcus, Dec 01 2014

Extensions

More terms from Alois P. Heinz, Dec 01 2014

A247168 Number of times n occurs in the sequence floor(log_Pi(i)) with i=1,2,3,... .

Original entry on oeis.org

6, 22, 66, 209, 655, 2059, 6468, 20321, 63839, 200556, 630065, 1979408, 6218494, 19535974, 61374075, 192812343, 605737840, 1902981546, 5978392847, 18781675046, 59004372349, 185367702702, 582349813020, 1829505894404, 5747562277559, 18056499427227
Offset: 1

Author

Talha Ali, Nov 29 2014

Keywords

Crossrefs

Formula

a(n) = floor(Pi^(n+1)) - floor(Pi^(n)) = A001672(n+1) - A001672(n), n>=1.

A248018 Least number k > 0 such that n^k contains n*R_n in its decimal representation, or 0 if no such k exists.

Original entry on oeis.org

1, 43, 119, 96, 186, 1740, 6177, 8421, 104191, 0, 946417
Offset: 1

Author

Talha Ali, Sep 29 2014

Keywords

Comments

R_n is the repunit of length n, i.e., R_n = (10^n-1)/9, A002275.
a(10^n) = 0 for all n > 0. - Derek Orr, Sep 29 2014
a(9) > 86000. - Derek Orr, Sep 29 2014
Note that a(2) = A030000(22), and a(3) = A063566(333), and that sequence is also related in a similar way to sequences from A063567 up to A063572. - Michel Marcus, Sep 30 2014

Examples

			a(2) = 43 because 2^43 = 8796093022208 has the string '22' in it and 43 is the smallest power of 2 that produces such a result.
a(3) = 119 because 3^119 = 599003433304810403471059943169868346577158542512617035467 contains the string '333', and 119 is the smallest power of 3 that gives us such a result.
		

Crossrefs

Cf. A002275.

Programs

  • Python
    def a(n):
      s = str(n)
      p = len(s)
      if s.count('1') == 1 and s.count('0') == p - 1:
        return 0
      k = 1
      while not str(n**k).count(n*s):
        k += 1
      return k
    n = 1
    while n < 10:
      print(a(n),end=', ')
      n += 1
    # Derek Orr, Sep 29 2014

Extensions

a(3) and a(5) corrected, a(6)-a(8) added by Derek Orr, Sep 29 2014
a(4) corrected and a(9)-a(11) added by Hiroaki Yamanouchi, Oct 01 2014

A248012 a(n)=p1^(p2^(p3^(p4^...)))... where p1

Original entry on oeis.org

2, 3, 2, 5, 8, 7, 2, 3, 32, 11, 8, 13, 128, 243, 2, 17, 8, 19, 32, 2187, 2048, 23, 8, 5, 8192, 3, 128, 29, 14134776518227074636666380005943348126619871175004951664972849610340958208, 31, 2, 177147, 131072, 78125, 8, 37, 524288, 1594323, 32, 41
Offset: 2

Author

Talha Ali, Sep 29 2014

Keywords

Examples

			To find a(14) we first find the distinct prime factors of 14 which are 2 and 7, which leads to a(14)=2^7=128.
To find a(8) we find 8's prime factors, 8=2*2*2, the distinct prime factor is 2 therefore a(8)=2.
30 has 3 distinct prime factors {2,3,5}, so a(30)=2^(3^5)=14134776518227074636666380005943348126619871175004951664972849610340958208.
		

Crossrefs

Cf. A027748.

Programs

A247880 For bases b = 2, 3, ..., n, let the base-b expansion of n be [c_{1,b} c_{2,b} .. c_{r_b,b}], with the most significant "digit" on the left, 0 <= c_{i,b} < b, and c_{1,b} != 0; then a(n) is the number whose base-n expansion is the sum of all those expansions, regarding the c_{i,j} as integers mod n.

Original entry on oeis.org

2, 7, 25, 44, 75, 106, 584, 885, 1213, 1595, 2201, 2758, 3419, 4176, 66388, 84490, 106391, 131905, 162181, 196924, 236973, 282814, 348325, 409728, 478356, 573416, 662184, 759951, 868308, 987703, 33592007, 39176497, 45480263, 52570673, 60522786, 69405129
Offset: 2

Author

Talha Ali, Sep 25 2014

Keywords

Comments

The base-n expansion of a(n) is the sum of the expansions of n in bases n, n-1, ..., 3, 2, regarding all the coefficients as numbers in the range 0 to n-1.

Examples

			For n=4, we first write 4 in bases 4, 3 and 2: 10, 11, 100, whose sum is the base 4 number 121, which is 25 in base 10.
For n=6, we get 110, 20, 12, 11, 10, whose sum (as base-6 numbers) is 203_6 = 75_10, so a(6) = 75.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(b=2, n, my(d = digits(n, b)); sum(k=1, #d, d[k]*n^(#d-k));); \\ Michel Marcus, Mar 19 2015

Extensions

Definition revised by N. J. A. Sloane, Sep 27 2014
a(7)-a(37) from Lars Blomberg, Feb 28 2015

A247878 For bases b = 2, 3, ..., n, let the base-b expansion of n be [c_{1,b} c_{2,b} .. c_{r_b,b}], with the most significant "digit" on the left, 0 <= c_{i,b} < b, and c_{1,b} != 0; then a(n) is the number whose base-n expansion is c_{1,2} c_{2,2} ... c_{r_2,2} c_{1,3} ... c_{1,n} c_{2,n} ... c_{r_n,n}.

Original entry on oeis.org

2, 39, 4180, 410780, 71114370, 16188759706, 35203970802248, 150323470036510005, 101010122201413121110, 82142319855341886460705, 86125744399762145472931164, 98834976539539763693131785850, 132929923088954538537350244463306, 205447801545228436007113806273864240
Offset: 2

Author

Talha Ali, Sep 25 2014

Keywords

Comments

The base-n expansion of a(n) is the concatenations of the expansions of n in bases 2, 3, ..., n-1, n, regarding all the coefficients as numbers in the range 0 to n-1.

Examples

			For n = 4, we first find 4 in base 2 = 1,0,0, then 4 in base 3 = 1,1, and 4 in base 4 = 1,0. The full string we now have is '1,0,0,1,1,1,0', which is the base-4 expansion of the number a(4) = 1*4^6 + 0*4^5 + 0*4^4 + 1*4^3 + 1*4^2 + 1*4^1 + 0*4^0 = 4180.
		

Crossrefs

Extensions

Definition revised by N. J. A. Sloane, Sep 27 2014
a(7)-a(15) from Hiroaki Yamanouchi, Oct 02 2014

A247873 For bases b = 2, 3, ..., n, let the base-b expansion of n be [c_{1,b} c_{2,b} .. c_{r_b,b}], with the most significant "digit" on the left, 0 <= c_{i,b} < b, and c_{1,b} != 0; then a(n) is the number whose base-n expansion is c_{1,n} c_{2,n} ... c_{r_n,n} c_{1,n-1} ... c_{1,2} c_{2,2} ... c_{r_2,2}.

Original entry on oeis.org

2, 31, 4432, 410276, 62490570, 14171701216, 35813773615616, 152181888842647477, 101112131420221011010, 82143288287525988974045, 80099420009719637413225296, 92321614375701368079704516014, 124155371020622584901673311361738, 192664414286229496774895472345022366
Offset: 2

Author

Talha Ali, Sep 25 2014

Keywords

Comments

The base-n expansion of a(n) is the concatenations of the expansions of n in bases n, n-1, ..., 3, 2, regarding all the coefficients as numbers in the range 0 to n-1.

Examples

			For n = 4 we first find 4 in base 4 = 1,0, then 4 in base 3 = 1,1, and 4 in base 2 = 1,0,0. The full string we now have is '1,0,1,1,1,0,0'. This is the base-4 expansion of the number a(4) = 1*4^6 + 0*4^5 + 1*4^4 + 1*4^3 + 1*4^2 + 0*4^1 + 0*4^0 = 4432.
		

Crossrefs

Extensions

Definition revised by N. J. A. Sloane, Sep 27 2014
a(7)-a(15) from Hiroaki Yamanouchi, Oct 02 2014