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

A005086 Number of Fibonacci numbers 1,2,3,5,... dividing n.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 1, 3, 2, 3, 1, 3, 2, 2, 3, 3, 1, 3, 1, 3, 3, 2, 1, 4, 2, 3, 2, 2, 1, 4, 1, 3, 2, 3, 2, 3, 1, 2, 3, 4, 1, 4, 1, 2, 3, 2, 1, 4, 1, 3, 2, 3, 1, 3, 3, 3, 2, 2, 1, 4, 1, 2, 3, 3, 3, 3, 1, 3, 2, 3, 1, 4, 1, 2, 3, 2, 1, 4, 1, 4, 2, 2, 1, 4, 2, 2, 2, 3, 2, 4, 2, 2, 2, 2, 2, 4, 1, 2, 2, 3, 1, 4, 1, 4, 4
Offset: 1

Views

Author

Keywords

Comments

Indices of records are in A129655. - R. J. Mathar, Nov 02 2007

Crossrefs

Programs

  • Maple
    with(combinat): for n from 1 to 200 do printf(`%d,`,sum(floor(n/fibonacci(k))-floor((n-1)/fibonacci(k)), k=2..15)) od:
  • Mathematica
    f[n_] := Block[{k = 1}, While[Fibonacci[k] <= n, k++ ]; Count[ Mod[n, Array[ Fibonacci, k - 1]], 0] - 1]; Array[f, 105] (* Robert G. Wilson v, Dec 10 2006 *)
  • PARI
    isfib(n)=my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8))
    a(n)=sumdiv(n,d,isfib(d)) \\ Charles R Greathouse IV, Nov 06 2014
    
  • Python
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    def A005086(n): return sum(1 for d in divisors(n,generator=True) if is_square(m:=5*d**2-4) or is_square(m+8)) # Chai Wah Wu, Mar 30 2023
    
  • Python
    from itertools import count, takewhile
    def F(f=1, g=1):
        while True:
            f, g = g, f+g;
            yield f
    def a(n):
        return sum(1 for f in takewhile(lambda x: x<=n, F()) if n%f == 0)
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Apr 03 2023

Formula

a(n) <= A072649(n). - Robert G. Wilson v, Dec 10 2006
Equals A051731 * A010056. - Gary W. Adamson, Nov 06 2007
G.f.: Sum_{n>=2} x^F(n)/(1-x^F(n)) where F(n) = A000045(n). - Joerg Arndt, Jan 06 2015
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A079586 - 1 = 2.359885... . - Amiram Eldar, Dec 31 2023

Extensions

More terms from James Sellers, Feb 19 2001
Incorrect comment removed by Charles R Greathouse IV, Nov 06 2014

A060832 a(n) = Sum_{k>0} floor(n/k!).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 10, 11, 13, 14, 16, 17, 20, 21, 23, 24, 26, 27, 30, 31, 33, 34, 36, 37, 41, 42, 44, 45, 47, 48, 51, 52, 54, 55, 57, 58, 61, 62, 64, 65, 67, 68, 71, 72, 74, 75, 77, 78, 82, 83, 85, 86, 88, 89, 92, 93, 95, 96, 98, 99, 102, 103, 105, 106, 108, 109, 112, 113
Offset: 0

Views

Author

Henry Bottomley, May 01 2001

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [&+[Floor(m/Factorial(k)):k in [1..m]]:m in [1..70]]; // Marius A. Burtea, Jul 11 2019
  • PARI
    a(n)={my(s=0, d=1, f=1); while (n>=d, s+=n\d; f++; d*=f); s} \\ Harry J. Smith, Jul 12 2009
    
  • PARI
    a(n) = round(sumpos(k=1, n\k!)); \\ Michel Marcus, Jan 24 2025
    

Formula

a(n) = a(n-1) + A055881(n).
a(n) = (e-1)*n + f(n) where f(n) < 0. - Benoit Cloitre, Jun 19 2002
f is unbounded in the negative direction. The assertion that f(n) < 0 is correct, since (e-1)*n = Sum_{k>=1} n/k! is term for term >= this sequence. - Franklin T. Adams-Watters, Nov 03 2005
G.f.: (1/(1 - x)) * Sum_{k>=1} x^(k!)/(1 - x^(k!)). - Ilya Gutkovskiy, Jul 11 2019

A038668 a(n)=[ n/3 ] + [ n/4 ] + [ n/7 ] + [ n/11 ] + [ n/18 ] + [ n/29 ] + [ n/47 ] + [ n/76 ] + [ n/123 ] + [ n/199 ]... (using Lucas numbers A000204).

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 4, 5, 6, 6, 7, 9, 9, 10, 11, 12, 12, 14, 14, 15, 17, 18, 18, 20, 20, 20, 21, 23, 24, 25, 25, 26, 28, 28, 29, 32, 32, 32, 33, 34, 34, 36, 36, 38, 39, 39, 40, 42, 43, 43, 44, 45, 45, 47, 48, 50, 51, 52, 52, 54, 54, 54, 56, 57, 57, 59, 59, 60, 61, 62, 62, 65, 65, 65
Offset: 1

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)

Keywords

Crossrefs

Cf. A038663.

Extensions

More terms from Sean A. Irvine, Feb 28 2010

A038669 [ n/2 ]+[ n/3 ]+[ n/4 ]+[ n/7 ]+[ n/11 ]+[ n/18 ]+[ n/29 ]+[ n/47 ]+[ n/76 ]+[ n/123 ]+[ n/199 ]+... (using Lucas numbers A000032).

Original entry on oeis.org

0, 1, 2, 4, 4, 6, 7, 9, 10, 11, 12, 15, 15, 17, 18, 20, 20, 23, 23, 25, 27, 29, 29, 32, 32, 33, 34, 37, 38, 40, 40, 42, 44, 45, 46, 50, 50, 51, 52, 54, 54, 57, 57, 60, 61, 62, 63, 66, 67, 68, 69, 71, 71, 74, 75, 78, 79, 81, 81, 84, 84, 85, 87, 89, 89, 92, 92, 94, 95, 97, 97, 101
Offset: 1

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)

Keywords

Crossrefs

Cf. A038663.

Programs

  • Maple
    lucas := proc(n) option remember: if n=0 then RETURN(2) fi: if n=1 then RETURN(1) fi: lucas(n- 1)+lucas(n-2) end: for j from 0 to 100 do it[j] := lucas(j) od: for n from 1 to 200 do printf(`%d,`,floor(n/2) + sum(floor(n/it[k]), k=2..15)) od:

Extensions

More terms from James Sellers, Feb 19 2001

A380408 a(n) = Sum_{k>=0} floor(n/(2k)!).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 74, 75, 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 92, 93, 95, 96, 98, 99, 101, 102, 104, 105, 107
Offset: 0

Views

Author

Akiva Weinberger, Jan 23 2025

Keywords

Comments

Partial sum of A060832 except for the first term in the sum.
Congruent to A034968(n) mod 2. Therefore, the parity of a(n) is the parity of the n-th permutation of k elements (k>=n) in lexicographic order.
For even n, a(n) equals A059563(n/2) whenever cosh(1)*n - a(n) < 1. The first time this fails is n=70, as a(70)=107 but A059563(35)=108. For small n, such failures appear to be very rare; however, the asymptotic density of these failures approaches 1.

Crossrefs

Programs

  • PARI
    a(n) = round(sumpos(k=0, n\(2*k)!)); \\ Michel Marcus, Jan 24 2025

Formula

a(n) = cosh(1)*n - f(n) where f(n) = Sum_{k>=0} fract(n/(2k)!). Here, fract() is the fractional part. The error term f(n) is unbounded above, and the greatest lower bound is 0 (even excluding n=0). The first values for which f(n) > s for s=1,2,3 are f(13)=1.06005, f(407) = 2.03382, and f(22319) = 3.01669. The error is almost periodic: for large m, f(n) is approximately f(n+(2m)!). If n is odd, f(n) > 1/2. f(n) alternately rises and descends, that is, f(2*n)f(2*n+2) for all n.
Showing 1-5 of 5 results.