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

A003107 Number of partitions of n into Fibonacci parts (with a single type of 1).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 10, 14, 17, 22, 27, 33, 41, 49, 59, 71, 83, 99, 115, 134, 157, 180, 208, 239, 272, 312, 353, 400, 453, 509, 573, 642, 717, 803, 892, 993, 1102, 1219, 1350, 1489, 1640, 1808, 1983, 2178, 2386, 2609, 2854, 3113, 3393, 3697, 4017, 4367, 4737
Offset: 0

Views

Author

Keywords

Comments

The partitions allow repeated items but the order of items is immaterial (1+2=2+1). - Ron Knott, Oct 22 2003
A098641(n) = a(A000045(n)). - Reinhard Zumkeller, Apr 24 2005

Examples

			a(4) = 4 since the 4 partitions of 4 using only Fibonacci numbers, repetitions allowed, are 1+1+1+1, 2+2, 2+1+1, 3+1.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007000, A005092, A028290 (where the only Fibonacci numbers allowed are 1, 2, 3, 5 and 8).
Row sums of A319394.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a003107 n = a003107_list !! n
    a003107_list = map (p' 2) [0..] where
       p' = memo2 integral integral p
       p _ 0 = 1
       p k m | m < fib   = 0
             | otherwise = p' k (m - fib) + p' (k + 1) m where fib = a000045 k
    -- Reinhard Zumkeller, Dec 09 2015
    
  • Maple
    F:= combinat[fibonacci]:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<2, 0,
           b(n, i-1)+`if`(F(i)>n, 0, b(n-F(i), i))))
        end:
    a:= proc(n) local j; for j from ilog[(1+sqrt(5))/2](n+1)
           while F(j+1)<=n do od; b(n, j)
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Jul 11 2013
  • Mathematica
    CoefficientList[ Series[1/ Product[1 - x^Fibonacci[i], {i, 2, 21}], {x, 0, 53}], x] (* Robert G. Wilson v, Mar 28 2006 *)
    nmax = 53;
    s = Table[Fibonacci[n], {n, nmax}];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Jul 31 2020 *)
    F = Fibonacci;
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 2, 0,
         b[n, i - 1] + If[F[i] > n, 0, b[n - F[i], i]]]];
    a[n_] := Module[{j}, For[j = Floor@Log[(1+Sqrt[5])/2, n+1],
         F[j + 1] <= n, j++]; b[n, j]];
    a /@ Range[0, 100] (* Jean-François Alcover, May 21 2021, after Alois P. Heinz *)
  • PARI
    f(x,y,z)=if(xCharles R Greathouse IV, Dec 14 2015

Formula

a(n) = (1/n)*Sum_{k=1..n} A005092(k)*a(n-k), n > 1, a(0)=1. - Vladeta Jovovic, Jan 21 2002
G.f.: Product_{i>=2} 1/(1-x^fibonacci(i)). - Ron Knott, Oct 22 2003
a(n) = f(n,1,1) with f(x,y,z) = if xReinhard Zumkeller, Nov 11 2009
G.f.: 1 + Sum_{i>=2} x^Fibonacci(i) / Product_{j=2..i} (1 - x^Fibonacci(j)). - Ilya Gutkovskiy, May 07 2017

Extensions

More terms from Vladeta Jovovic, Jan 21 2002

A007000 Number of partitions of n into Fibonacci parts (with 2 types of 1).

Original entry on oeis.org

1, 2, 4, 7, 11, 17, 25, 35, 49, 66, 88, 115, 148, 189, 238, 297, 368, 451, 550, 665, 799, 956, 1136, 1344, 1583, 1855, 2167, 2520, 2920, 3373, 3882, 4455, 5097, 5814, 6617, 7509, 8502, 9604, 10823, 12173, 13662, 15302, 17110, 19093, 21271, 23657, 26266
Offset: 0

Views

Author

Keywords

Examples

			a(2)=4 because we have [2],[1',1'],[1',1],[1,1] (the two types of 1 are denoted 1 and 1').
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003107.
Cf. A000045.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a007000 n = a007000_list !! n
    a007000_list = map (p' 1) [0..] where
       p' = memo2 integral integral p
       p _ 0 = 1
       p k m | m < fib   = 0
             | otherwise = p' k (m - fib) + p' (k + 1) m where fib = a000045 k
    -- Reinhard Zumkeller, Dec 09 2015
  • Maple
    with(combinat): gf := 1/product((1-q^fibonacci(k)), k=1..20): s := series(gf, q, 200): for i from 0 to 199 do printf(`%d,`,coeff(s, q, i)) od: # James Sellers, Feb 08 2002
  • Mathematica
    CoefficientList[ Series[ 1/Product[1 - x^Fibonacci[i], {i, 1, 15}], {x, 0, 50}], x]
    nmax = 46; f = Table[Fibonacci[n], {n, nmax}];
    Table[Length[IntegerPartitions[n, All, f]], {n, 0, nmax}] (* Robert Price, Aug 02 2020 *)

Formula

a(n) = 1/n*Sum_{k=1..n} (A005092(k)+1)*a(n-k), n > 1, a(0)=1. - Vladeta Jovovic, Aug 22 2002
G.f.: 1/Product_{j>=1} (1-x^fibonacci(j)). - Emeric Deutsch, Mar 05 2006
G.f.: Sum_{i>=0} x^Fibonacci(i) / Product_{j=1..i} (1 - x^Fibonacci(j)). - Ilya Gutkovskiy, May 07 2017

Extensions

More terms from James Sellers, Feb 08 2002

A293432 Sum of Jacobsthal numbers that divide n.

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 1, 1, 4, 6, 12, 4, 1, 1, 9, 1, 1, 4, 1, 6, 25, 12, 1, 4, 6, 1, 4, 1, 1, 9, 1, 1, 15, 1, 6, 4, 1, 1, 4, 6, 1, 25, 44, 12, 9, 1, 1, 4, 1, 6, 4, 1, 1, 4, 17, 1, 4, 1, 1, 9, 1, 1, 25, 1, 6, 15, 1, 1, 4, 6, 1, 4, 1, 1, 9, 1, 12, 4, 1, 6, 4, 1, 1, 25, 91, 44, 4, 12, 1, 9, 1, 1, 4, 1, 6, 4, 1, 1, 15, 6, 1, 4, 1, 1, 30
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2017

Keywords

Comments

a(n) is the sum of the divisors of n that are Jacobsthal numbers (A001045).

Examples

			For n = 15, whose divisors are [1, 3, 5, 15], the first three, 1, 3 and 5 are all in A001045, thus a(15) = 1 + 3 + 5 = 9.
For n = 105, whose divisors are [1, 3, 5, 7, 15, 21, 35, 105], only the divisors 1, 3, 5 and 21 are in A001045, thus a(105) = 1 + 3 + 5 + 21 = 30.
For n = 21845, whose divisors are [1, 5, 17, 85, 257, 1285, 4369, 21845], the divisors 1, 5, 85 and 21845 are in A001045, thus a(21845) = 1 + 5 + 85 + 21845 = 21936.
		

Crossrefs

Programs

  • Mathematica
    With[{s = LinearRecurrence[{1, 2}, {0, 1}, 24]}, Array[DivisorSum[#, # &, MemberQ[s, #] &] &, 105]] (* Michael De Vlieger, Oct 09 2017 *)
  • PARI
    A147612aux(n,i) = if(!(n%2),n,A147612aux((n+i)/2,-i));
    A147612(n) = 0^(A147612aux(n,1)*A147612aux(n,-1));
    A293432(n) = sumdiv(n,d,A147612(d)*d);
    
  • Python
    from sympy import divisors
    def A293432(n): return sum(d for d in divisors(n,generator=True) if (m:=3*d+1).bit_length()>(m-3).bit_length()) # Chai Wah Wu, Apr 18 2025

Formula

a(n) = Sum_{d|n} A147612(d)*d.
a(n) = A293434(n) + (A147612(n)*n).

A293436 a(n) is the sum of the proper divisors of n that are Fibonacci numbers (A000045).

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 3, 4, 8, 1, 6, 1, 3, 9, 11, 1, 6, 1, 8, 4, 3, 1, 14, 6, 16, 4, 3, 1, 11, 1, 11, 4, 3, 6, 6, 1, 3, 17, 16, 1, 27, 1, 3, 9, 3, 1, 14, 1, 8, 4, 16, 1, 6, 6, 11, 4, 3, 1, 11, 1, 3, 25, 11, 19, 6, 1, 37, 4, 8, 1, 14, 1, 3, 9, 3, 1, 19, 1, 16, 4, 3, 1, 27, 6, 3, 4, 11, 1, 11, 14, 3, 4, 3, 6, 14, 1, 3, 4, 8, 1, 40, 1, 24, 30
Offset: 1

Views

Author

Antti Karttunen, Oct 09 2017

Keywords

Examples

			For n = 55, its proper divisors are [1, 5, 11], of which only 1 and 5 are in A000045, thus a(55) = 1 + 5 = 6.
For n = 10946, its proper divisors are [1, 2, 13, 26, 421, 842, 5473], and only 1, 2 and 13 are Fibonacci numbers, thus a(10946) = 1 + 2 + 13 = 16.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Fibonacci@ Range[2, 40]}, Table[DivisorSum[n, # &, And[MemberQ[s, #], # != n] &], {n, 105}]] (* Michael De Vlieger, Oct 09 2017 *)
  • PARI
    A010056(n) = { my(k=n^2); k+=(k+1)<<2; (issquare(k) || (n>0 && issquare(k-8))) }; \\ This function from Charles R Greathouse IV, Jul 30 2012
    A293436(n) = sumdiv(n,d,(dA010056(d)*d);

Formula

a(n) = Sum_{d|n, dA010056(d)*d.
a(n) = A005092(n) - (A010056(n)*n).
G.f.: Sum_{k>=2} Fibonacci(k) * x^(2*Fibonacci(k)) / (1 - x^Fibonacci(k)). - Ilya Gutkovskiy, Apr 14 2021

A005093 Sum of squares of Fibonacci numbers 1,2,3,5,... that divide n.

Original entry on oeis.org

1, 5, 10, 5, 26, 14, 1, 69, 10, 30, 1, 14, 170, 5, 35, 69, 1, 14, 1, 30, 451, 5, 1, 78, 26, 174, 10, 5, 1, 39, 1, 69, 10, 1161, 26, 14, 1, 5, 179, 94, 1, 455, 1, 5, 35, 5, 1, 78, 1, 30, 10, 174, 1, 14, 3051, 69, 10, 5, 1, 39
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 100; With[{fibs = Fibonacci[Range[2, Floor[Log[nmax*Sqrt[5]] / Log[GoldenRatio]] + 1]]}, Table[Total[Select[fibs, Divisible[n, #1] & ]^2], {n, 1, nmax}]] (* Harvey P. Dale, Apr 25 2011, fixed by Vaclav Kotesovec, Apr 29 2019 *)
  • Python
    from sympy import divisors, fibonacci
    l = [fibonacci(n) for n in range(1, 21)]
    def a(n):
        return sum(i**2 for i in divisors(n) if i in l)
    print([a(n) for n in range(1, 101)])  # Indranil Ghosh, Mar 22 2017

Formula

G.f.: Sum_{k>=2} Fibonacci(k)^2*x^Fibonacci(k)/(1 - x^Fibonacci(k)). - Ilya Gutkovskiy, Mar 21 2017

Extensions

Offset changed from 0 to 1 by Ilya Gutkovskiy, Mar 21 2017
b-file corrected by Vaclav Kotesovec, Apr 29 2019

A339621 Sum of Fibonacci divisors of n^2 + 1.

Original entry on oeis.org

1, 3, 6, 8, 1, 16, 1, 8, 19, 3, 1, 3, 6, 42, 1, 3, 1, 8, 19, 3, 1, 50, 6, 8, 1, 3, 1, 8, 6, 3, 1, 16, 6, 8, 103, 3, 1, 8, 6, 3, 1, 3, 6, 8, 14, 3, 1, 55, 6, 3, 1, 3, 6, 8, 1, 126, 1, 21, 6, 3, 14, 3, 6, 8, 1, 3, 1, 8, 6, 3, 391, 3, 6, 21, 1, 3, 1, 8, 6, 3, 1, 37
Offset: 0

Views

Author

Michel Lagneau, Dec 10 2020

Keywords

Comments

A Fibonacci divisor of a number k is a Fibonacci number that divides k. (The divisor 1 is only counted once.)
For n < 2*10^5, the subsequence of primes begins by 3, 19, 37, 97, 103, 131, 139, 239, 241, 283, 359, 487, 631, ...
The Fibonacci numbers of the sequence are 1, 3, 8, 21, 55, 144, 377, ...
Conjecture: If the sum of the Fibonacci divisors of m^2 + 1 is a Fibonacci number, then this number belongs to the sequence A001906(n) = F(2n) where F(n) is the Fibonacci sequence.
The sequence giving the least k such that the sum of Fibonacci divisors of k^2 + 1 is equal to F(2*n) for n > 0 begins with: 0, 1, 3, 57, 47, 15007, 1679553, ...

Examples

			a(3) = 8 because the divisors of 3^2 + 1 = 10 are {1, 2, 5, 10}, and the sum of the Fibonacci divisors is 1 + 2 + 5 = 8.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(issqr(5*d^2+4) or issqr(5*d^2-4), d, 0)
    , d=numtheory[divisors](n^2+1)):seq(a(n), n=0..100);
  • Mathematica
    Array[DivisorSum[#^2 + 1, # &, AnyTrue[Sqrt[5 #^2 + 4 {-1, 1}], IntegerQ] &] &, 82, 0] (* Michael De Vlieger, Dec 10 2020 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || issquare(k-8);
    a(n) = sumdiv(n^2+1, d, if (isfib(d), d)); \\ Michel Marcus, Dec 10 2020

Formula

a(A005574(n)) = 1 for n > 2.
a(n) = 3 when n^2 + 1 = 2*p, p prime and non-Fibonacci number.
a(n) = A005092(A002522(n)). - Michel Marcus, Aug 10 2022

A300895 L.g.f.: log(Product_{k>=2} (1 + x^Fibonacci(k))) = Sum_{n>=1} a(n)*x^n/n.

Original entry on oeis.org

1, 1, 4, -3, 6, -2, 1, 5, 4, -4, 1, -6, 14, 1, 9, -11, 1, -2, 1, -8, 25, 1, 1, 2, 6, -12, 4, -3, 1, -7, 1, -11, 4, 35, 6, -6, 1, 1, 17, 0, 1, -23, 1, -3, 9, 1, 1, -14, 1, -4, 4, -16, 1, -2, 61, 5, 4, 1, 1, -11, 1, 1, 25, -11, 19, -2, 1, -37, 4, -4, 1, 2, 1, 1, 9, -3, 1, -15, 1, -16, 4, 1, 1, -27, 6
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 14 2018

Keywords

Examples

			L.g.f.: L(x) = x + x^2/2 + 4*x^3/3 - 3*x^4/4 + 6*x^5/5 - 2*x^6/6 + x^7/7 + 5*x^8/8 + 4*x^9/9 - 4*x^10/10 + ...
exp(L(x)) = 1 + x + x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + x^7 + 3*x^8 + 2*x^9 + 2*x^10 + ... + A000119(n)*x^n + ...
		

Crossrefs

Programs

  • Mathematica
    nmax = 85; Rest[CoefficientList[Series[Log[Product[(1 + x^Fibonacci[k]), {k, 2, 14}]], {x, 0, nmax}],x] Range[0, nmax]]
    nmax = 85; Rest[CoefficientList[Series[Sum[Fibonacci[k] x^Fibonacci[k]/(1 + x^Fibonacci[k]), {k, 2, 14}], {x, 0, nmax}], x]]
    Table[DivisorSum[n, (-1)^(n/# + 1) # &, IntegerQ[(5 #^2 + 4)^(1/2)] || IntegerQ[(5 #^2 - 4)^(1/2)] &], {n, 85}]

Formula

G.f.: Sum_{k>=2} Fibonacci(k)*x^Fibonacci(k)/(1 + x^Fibonacci(k)).
a(n) = n + 1 if n is an odd prime Fibonacci number (A005478 except a(1) = 2).

A355758 Irregular triangle read by rows in which row n lists the divisors of n that are Fibonacci numbers.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 3, 1, 1, 2, 8, 1, 3, 1, 2, 5, 1, 1, 2, 3, 1, 13, 1, 2, 1, 3, 5, 1, 2, 8, 1, 1, 2, 3, 1, 1, 2, 5, 1, 3, 21, 1, 2, 1, 1, 2, 3, 8, 1, 5, 1, 2, 13, 1, 3, 1, 2, 1, 1, 2, 3, 5, 1, 1, 2, 8, 1, 3, 1, 2, 34, 1, 5, 1, 2, 3, 1, 1, 2, 1, 3, 13, 1, 2, 5, 8
Offset: 1

Views

Author

Michel Marcus, Jul 16 2022

Keywords

Examples

			Irregular triangle begins:
  1;
  1, 2;
  1, 3;
  1, 2;
  1, 5;
  1, 2, 3;
  1;
  1, 2, 8;
  1, 3;
  1, 2, 5;
  ...
		

Crossrefs

Cf. A000012 (left border), A054494 (right border).
Cf. A005086 (row lengths), A005092 (row sums).
Subsequence of A027750.

Programs

  • Mathematica
    With[{fib = Fibonacci[Range[2, 10]]}, row[n_] := Select[Divisors[n], MemberQ[fib, #] &]; Table[row[n], {n, 1, fib[[-1]]}] // Flatten] (* Amiram Eldar, Jul 16 2022 *)
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8)); \\ A010056
    row(n) = select(isfib, divisors(n));
Showing 1-8 of 8 results.