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

A103838 Complement of A001671.

Original entry on oeis.org

2, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
Offset: 0

Views

Author

N. J. A. Sloane, Mar 30 2005

Keywords

Formula

a(n) = n + [log(n + [log(n)])], apart from some initial exceptions. - David W. Wilson, Mar 29 2005

A000149 a(n) = floor(e^n).

Original entry on oeis.org

1, 2, 7, 20, 54, 148, 403, 1096, 2980, 8103, 22026, 59874, 162754, 442413, 1202604, 3269017, 8886110, 24154952, 65659969, 178482300, 485165195, 1318815734, 3584912846, 9744803446, 26489122129, 72004899337, 195729609428, 532048240601, 1446257064291
Offset: 0

Views

Author

Keywords

Comments

A000079(n) <= a(n) <= A000244(n); for n > 0: A064780(n) = a(n+1) - a(n). - Reinhard Zumkeller, Mar 17 2015
Satisfies Benford's law [Whyman et al., 2016]. - N. J. A. Sloane, Feb 12 2017

References

  • Federal Works Agency, Work Projects Administration for the City of NY, Tables of the Exponential Function. National Bureau of Standards, Washington, DC, 1939.
  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 230.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisection: A116472.
Cf. A001113, A003619, A000079, A000244, A064780 (first differences, apart from initial term).
Cf. A000227 (round e^n), A001671 (ceiling e^n).

Programs

  • Haskell
    a000149 = floor . (exp 1 ^)
    a000149_list = let e = exp 1 in map floor $ iterate (* e) 1
    -- Reinhard Zumkeller, Mar 17 2015
    
  • Mathematica
    a[n_]:=Floor[E^n]; (* Vladimir Joseph Stephan Orlovsky, Dec 12 2008 *)
    Floor[E^Range[0,30]] (* Harvey P. Dale, Apr 01 2012 *)
  • PARI
    a(n) = floor(exp(n)); \\ Arkadiusz Wesolowski, Nov 26 2011
    
  • PARI
    apply( A000149(n)=exp(n)\1, [0..30]) \\ An error message will say so if default(realprecision) must be increased, for large n. - M. F. Hasler, May 27 2018
    
  • Python
    from sympy import floor, E
    def a(n):  return floor(E**n)
    print([a(n) for n in range(29)]) # Michael S. Branicky, Jul 20 2021

Formula

a(n)^(1/n) converges to e because |1-a(n)/e^n|=|e^n-a(n)|/e^n < e^(-n) and so a(n)^(1/n)=(e^n*(1+o(1)))^(1/n)=e*(1+o(1)). - Hieronymus Fischer, Jan 22 2006

A000227 Nearest integer to e^n.

Original entry on oeis.org

1, 3, 7, 20, 55, 148, 403, 1097, 2981, 8103, 22026, 59874, 162755, 442413, 1202604, 3269017, 8886111, 24154953, 65659969, 178482301, 485165195, 1318815734, 3584912846, 9744803446, 26489122130, 72004899337, 195729609429, 532048240602, 1446257064291, 3931334297144, 10686474581524
Offset: 0

Views

Author

Keywords

Comments

x = e^n is the location of the maximum of x^(1/x^(1/n)). One can define another sequence, c(n) as the value of the natural number k that maximizes k^(1/k^(1/n)). Empirically, despite the rounding, c(n) and a(n) match each other until at least n>24500 (see the link). - Stanislav Sykora, Jun 06 2014

References

  • Federal Works Agency, Work Projects Administration for the City of NY, Tables of the Exponential Function. National Bureau of Standards, Washington, DC, 1939.
  • A. Fletcher, J. C. P. Miller, L. Rosenhead and L. J. Comrie, An Index of Mathematical Tables. Vols. 1 and 2, 2nd ed., Blackwell, Oxford and Addison-Wesley, Reading, MA, 1962, Vol. 1, p. 230.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000149 (floor e^n), A001671 (e^n rounded up), A002160 (nearest integer to Pi^n).

Programs

  • Maple
    Digits := 40: [seq(round(exp(n)), n=0..30)];
  • Mathematica
    Table[ Round[ N[E^n] ], {n, 0, 30} ]
    Round[E^Range[0,30]] (* Harvey P. Dale, Jul 28 2025 *)
  • PARI
    apply( A000227(n)=exp(n)\/1, [0..50]) \\ An error message will say so if default(realprecision) must be increased. - M. F. Hasler, May 27 2018

A079490 Exp(n) is closer to an integer than any previous exp(k) for 1 <= k < n.

Original entry on oeis.org

1, 3, 8, 19, 45, 75, 135, 178, 209, 732, 1351, 1907, 5469, 28414, 37373, 404055, 902497
Offset: 1

Views

Author

Donald S. McDonald, Jan 20 2003

Keywords

Examples

			a(2) = 3: exp(3) = 20.08... is closer to an integer than exp(1) = 2.718...
At 37373 the difference from an integer is 0.0000010493779591646530966...
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 178, p. 56, Ellipses, Paris 2008.

Crossrefs

Programs

  • Mathematica
    a = 1; Do[ d = Abs[ Round[E^n] - N[E^n, Ceiling[ Log[10, E^n] + 10]]]; If[d < a, Print[n]; a = d], {n, 1, 50000}]
  • PARI
    {default(realprecision,1000); d(x)=abs(x-round(x))}; a(n)=local(m); if(n<2,n>0,n=a(n-1); m=d(exp(n)); until(d(exp(n))
    				
  • PARI
    d(x)=x=frac(x); min(x,1-x)
    D(n)=localbitprec(n/log(2)+99); d(exp(n))
    r=1; for(n=1,4e4, t=D(n); if(tCharles R Greathouse IV, Oct 31 2022

Extensions

Corrected and extended to 1351 by several correspondents, Jan 20 2003
a(12)-a(15) from Robert G. Wilson v, Jan 20 2003
a(16)-a(17) from Charles R Greathouse IV, Nov 01 2022

A059303 Numbers k such that floor(e^k) + 1 is prime.

Original entry on oeis.org

0, 1, 5, 7, 10, 105, 22959, 34888
Offset: 1

Views

Author

Felice Russo, Jan 25 2001

Keywords

Comments

0 followed by all k such that ceiling(e^k) is prime. - Jeppe Stig Nielsen, Feb 12 2024

Crossrefs

Programs

  • Mathematica
    Select[Range[40000], PrimeQ[Floor[E^#] + 1] &] (* G. C. Greubel, Jan 06 2017 *)
  • PARI
    isok(k) = isprime(floor(exp(k))+1) \\ Michel Marcus, Jun 08 2013

Extensions

Corrected by Francisco Salinas (franciscodesalinas(AT)hotmail.com), Dec 25 2001
a(7)-a(8) from Donovan Johnson

A114650 a(1)=1. For n>1, a(n) is smallest positive integer not among the earlier terms of the sequence such that floor(log(a(n))) does not equal floor(log(a(n-1))).

Original entry on oeis.org

1, 3, 2, 4, 8, 5, 9, 6, 10, 7, 11, 21, 12, 22, 13, 23, 14, 24, 15, 25, 16, 26, 17, 27, 18, 28, 19, 29, 20, 30, 55, 31, 56, 32, 57, 33, 58, 34, 59, 35, 60, 36, 61, 37, 62, 38, 63, 39, 64, 40, 65, 41, 66, 42, 67, 43, 68, 44, 69, 45, 70, 46, 71, 47, 72, 48, 73, 49, 74, 50, 75, 51
Offset: 1

Views

Author

Leroy Quet, Dec 21 2005

Keywords

Comments

Sequence is a permutation of the positive integers. (Sequence A114651 is the inverse permutation.)
Apparently this permutation is completely decomposable into (disjoint) cycles of finite length. The number of fixed points (cf. A114726) seems to be infinite, but for each k>1 there are presumably only finitely many cycles of length k (cf. A114727 and A114728). - Klaus Brockhaus, Dec 29 2005

Examples

			Since all positive integers m where floor(log(m)) equals 0 or 1 occur among the first 11 terms of the sequence and since floor(log(a(11))) = 2, then a(12) must be 21 (which is the smallest positive integer m such that floor(log(m)) = 3).
		

Crossrefs

Extensions

More terms from Klaus Brockhaus, Dec 25 2005

A114726 Fixed points of permutation A114650.

Original entry on oeis.org

1, 4, 11, 30, 79, 218, 589, 1604, 4357, 11850, 32203, 87546, 237963, 646864
Offset: 1

Views

Author

Klaus Brockhaus, Dec 29 2005, Jan 10 2006

Keywords

Comments

Observation: A001671(n) < a(n) < A001671(n+1) for 1 < n <= 14.
Conjecture: Sequence is infinite and lim n -> infinity a(n+1)/a(n) = e = 2.718281828...

Examples

			A114650(11) = 11, so 11 is a term.
		

Crossrefs

A333534 a(n) is the number of log(n)-smooth numbers <= n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19
Offset: 2

Views

Author

N. J. A. Sloane, Apr 08 2020

Keywords

Comments

Number of k <= n such that the greatest prime factor of k is <= log(n).

Crossrefs

Programs

  • Maple
    A333534 := n -> nops(select(k -> A006530(k) <= ilog(n), [$1..n])):
    seq(A333534(n), n=2..86); # Peter Luschny, Apr 09 2020
    # second Maple program:
    b:= proc(n) option remember; max(1, map(i-> i[1], ifactors(n)[2])) end:
    a:= n-> (t-> add(`if`(b(i)<= t, 1, 0), i=1..n))(ilog(n)):
    seq(a(n), n=2..100);  # Alois P. Heinz, Apr 09 2020
  • Mathematica
    a[n_] := Select[Range[n], FactorInteger[#][[-1, 1]] <= Log[n]&] // Length;
    a /@ Range[2, 100] (* Jean-François Alcover, May 17 2020 *)
  • PARI
    gpf(j)={if(j==1,1,my(f=factor(j));f[#f[,2],1])};
    for(n=2,80,my(L=log(n));print1(sum(k=1,n,gpf(k)<=L),", ")) \\ Hugo Pfoertner, Apr 09 2020
    
  • PARI
    sm(lim, p)=if(p==2, return(logint(lim\1, 2)+1)); my(s=0, q=precprime(p-1), t=1); for(e=0, logint(lim\=1, p), s+=sm(lim\t, q); t*=p); s
    a(n)=if(n<8,return(n>2)); sm(n, precprime(log(n))) \\ Charles R Greathouse IV, Apr 16 2020

Formula

a(n) = A096300(n), n>2. - R. J. Mathar, Apr 27 2020

A072632 Solutions to A072631[n]=0.

Original entry on oeis.org

1, 3, 8, 21, 55, 149, 404, 1097, 2981, 8104, 22027, 59875, 162755, 442414, 1202605, 3269018
Offset: 1

Views

Author

Labos Elemer, Jun 28 2002

Keywords

Comments

Essentially the same as A001671.

Examples

			Compare with A072610 [related to A004648].
		

Crossrefs

Programs

  • Mathematica
    Do[s=Floor[Mod[Floor[n*Log[n]]//N, n]]; If[s==0, Print[n]], {n, 1, 10000000}]

A116938 Expansion of e^2 in base 2.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0
Offset: 3

Views

Author

Jonathan Vos Post, Mar 21 2006

Keywords

Examples

			111.010001000000 (base 2) ~ 7.389056098930650... (base 10) ~ e^2. 100 decimal places precision here.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.3.
  • Eli Maor, e: The Story of a Number, Princeton Univ. Press, 1994.

Crossrefs

Cf. A001113 (e), A072334 (e^2), A090142 (e^2-e).
Cf. A090143 (e^3-2e^2+e/2), A089139 (e^4-3e^3+2e^2-e/6), A090143 (e^3-2e^2+e/2).
Cf. A001671 (powers of e rounded up), A107586 (powers of e^(1/e) rounded up).

Programs

Showing 1-10 of 10 results.