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.

Previous Showing 11-18 of 18 results.

A136610 Number of odd digits in Fibonacci numbers.

Original entry on oeis.org

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

Views

Author

Parthasarathy Nambi, May 11 2008

Keywords

Examples

			1597 = Fibonacci(17) and has four odd digits, so a(17) = 4.
		

Crossrefs

Cf. A060384, A085855. - R. J. Mathar, Jul 08 2009

Programs

  • Maple
    nodss := proc(n) local dgs,d; dgs := convert(n,base,10) ; add( d mod 2, d=dgs) ; end: A136610 :=proc(n) nodss(combinat[fibonacci](n)) ; end: seq( A136610(n),n=0..80) ; # R. J. Mathar, Jul 08 2009
  • Mathematica
    a[n_]:=Total[Boole[OddQ/@IntegerDigits[Fibonacci[n]]]] (* James C. McMahon, May 06 2025 *)

Formula

a(n) = A196564(A000045(n)). - Michel Marcus, May 06 2025
a(n) = A060384(n) - A138468(n). - James C. McMahon, Jun 07 2025

Extensions

a(13) corrected and more terms added by R. J. Mathar, Jul 08 2009

A138468 Number of even digits in Fibonacci numbers.

Original entry on oeis.org

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

Views

Author

Parthasarathy Nambi, May 18 2008

Keywords

Comments

Zero is counted as an even digit.

Examples

			The Fibonacci number 2584 has three even digits in it, so a(18) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Boole[EvenQ/@IntegerDigits[Fibonacci[n]]]],{n,0,96}] (* James C. McMahon, Jun 07 2025 *)

Formula

a(n) = A060384(n) - A136610(n). - Robert Israel, May 25 2017

Extensions

a(0) corrected, and more terms from Robert Israel, May 25 2017

A386758 Number of decimal digits in the n-th Lucas number.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17
Offset: 0

Views

Author

Hans J. H. Tuenter, Aug 06 2025

Keywords

Comments

As F(n)<=L(n), the number of decimal digits of the Lucas number L(n) is at least as large as the number of decimal digits of the Fibonacci number F(n). Furthermore, the difference is at most one. The indices for which the difference is one is A386760.

Examples

			L(0)=2 has one digit, so that a(0)=1; L(5)=11 has two digits, so that a(5)=2.
		

Crossrefs

Number of digits of L(p^n): A094057 (p=2), A114469 (p=10).

Programs

  • Maple
    a:= n-> 1+floor(n*log[10]((1+sqrt(5))/2)):
    seq(a(n), n=0..81);
  • Mathematica
    a[n_] := IntegerLength[LucasL[n]]; Array[a, 100, 0] (* Amiram Eldar, Aug 16 2025 *)

Formula

a(n) = A055642(A000032(n)).
a(n) = 1 + floor(n*log_10(phi)), where log_10(phi) = A097348, and phi = (1+sqrt(5))/2 = A001622.

A386760 Numbers k such that the number of decimal digits of the Lucas number L(k) is greater than the number of decimal digits of the Fibonacci number F(k).

Original entry on oeis.org

5, 6, 10, 11, 15, 16, 20, 24, 25, 29, 30, 34, 35, 39, 44, 48, 49, 53, 54, 58, 59, 63, 67, 68, 72, 73, 77, 78, 82, 83, 87, 91, 92, 96, 97, 101, 102, 106, 111, 115, 116, 120, 121, 125, 126, 130, 134, 135, 139, 140, 144, 145, 149, 150, 154, 158, 159, 163, 164, 168
Offset: 1

Views

Author

Hans J. H. Tuenter, Aug 13 2025

Keywords

Comments

The difference in the number of decimal digits, A055642(L(k))-A055642(F(k)) = A060384(k)-A386758(k) is either zero or one. In fact, this difference is ceiling(beta-{k*alpha}), with alpha and beta as defined in the Formula section. This implies that, asymptotically, a fraction of beta=0.349485... of the Lucas numbers has one more decimal digit than the corresponding Fibonacci number. This gives the asymptotic behavior of the sequence as a(n)~n/beta. Conjecture: abs(a(n)-n/beta)

Examples

			5 is a term since F(5)=5 has length 1 decimal digit, but L(5)=11 has length 2 decimal digits which is greater.
		

Programs

  • Mathematica
    Select[Range[168],IntegerLength[LucasL[#]]>IntegerLength[Fibonacci[#]]&] (* James C. McMahon, Aug 28 2025 *)

Formula

The sequence consists of the integers k>=2, for which {k*alpha}A097348, and phi = (1+sqrt(5))/2 = A001622.

A246554 Concatenation of the n-th Fibonacci number with itself.

Original entry on oeis.org

11, 11, 22, 33, 55, 88, 1313, 2121, 3434, 5555, 8989, 144144, 233233, 377377, 610610, 987987, 15971597, 25842584, 41814181, 67656765, 1094610946, 1771117711, 2865728657, 4636846368, 7502575025, 121393121393, 196418196418, 317811317811, 514229514229
Offset: 1

Author

Indrani Das, Nov 14 2014

Keywords

Comments

a(n) is the n-th Fibonacci number concatenated with itself; concatenation A000045.
Also, the quotient of a(n) divided by the n-th Fibonacci number is 10^d(n)+1, where d(n) is the number of digits in the n-th Fibonacci number (A060384).

Examples

			The 7th Fibonacci number, 13, is concatenated with itself to become a(7) = 1313.
		

Crossrefs

Programs

  • Magma
    [Seqint(Intseq(Fibonacci(n)) cat Intseq(Fibonacci(n))): n in [1..30]]; // Vincenzo Librandi, Nov 15 2014
  • Maple
    A:= proc(n)
    local f;
    f:= combinat:-fibonacci(n);
    (10^length(f)+1)*f;
    end proc:
    map(A, [$1..100]); # Robert Israel, Nov 16 2014
    # second Maple program:
    a:= n-> (p-> parse(cat(p$2)))((<<0|1>, <1|1>>^n)[1, 2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 17 2014
  • Mathematica
    Table[FromDigits[Join[Flatten[IntegerDigits[{Fibonacci[n], Fibonacci[n]}]]]], {n, 50}] (* Vincenzo Librandi, Nov 15 2014 *)
    #*10^IntegerLength[#]+#&/@Fibonacci[Range[30]] (* Harvey P. Dale, Jul 04 2015 *)
  • PARI
    a(n)=(k->eval(Str(k,k)))(fibonacci(n)) \\ Charles R Greathouse IV, Nov 15 2014
    

Formula

a(n) = A000045(n)*(10^A060384(n)+1). - Robert Israel, Nov 16 2014

A362358 Alternating sum of digits of the Fibonacci numbers, with a plus sign for the last digit.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 2, -1, 1, 0, 1, 1, 2, 3, 5, 8, 2, -1, -10, 0, 12, 1, 2, 3, 5, -3, 13, -1, 1, -11, 1, 12, 2, 3, 5, -3, 13, 10, 1, 0, 1, -10, 13, 3, -17, 19, -9, 10, 1, 0, 1, 12, 13, 3, -6, 8, 2, -1, -10, 0, 1, 12, -9, 3, 5, -3, -9, -23, 1, -22, 34, -10, 2
Offset: 0

Author

Wolfdieter Lang, May 26 2023

Keywords

Comments

a(n) mod 11 = F(n) mod 11 = A105955(n). This is the mod 11 rule applied to F(n) = A000045.

Examples

			F(17) = 1597, s(n) = 4 - 1 = 3, a(17) = 7 - 9 + 5 - 1 = 2.
		

Programs

  • Mathematica
    a[n_]:=Sum[(-1)^(IntegerLength[Fibonacci[n]]-i) Part[IntegerDigits[Fibonacci[n]],i],{i,IntegerLength[Fibonacci[n]]}]; Array[a,66,0] (* Stefano Spezia, May 27 2023 *)
  • PARI
    a(n) = my(d=Vecrev(digits(fibonacci(n)))); sum(k=1, #d, (-1)^(k+1)*d[k]); \\ Michel Marcus, May 28 2023

Formula

Let [f_s(n), f_{s(n)-1}, ..., f_0] be the list of digits of F(n) = A000040(n) with s(n) = A060384(n) - 1, then a(n) = Sum_{j=0..s(n)} (-1)^j*f_j.
a(n) = A055017(A000045(n)), for n >= 0.

A385248 Number of digits in the decimal expansion of Fibonacci(2^n).

Original entry on oeis.org

1, 1, 1, 2, 3, 7, 14, 27, 54, 107, 214, 428, 856, 1712, 3424, 6848, 13696, 27393, 54785, 109570, 219140, 438279, 876558, 1753116, 3506231, 7012462, 14024923, 28049846, 56099693, 112199385, 224398770, 448797540, 897595080, 1795190160, 3590380321, 7180760641
Offset: 0

Author

Juande Santander-Vela, Jul 28 2025

Keywords

Comments

Binet's formula is Fibonacci(k) = (phi^k - psi^k)/sqrt(5), with phi being the golden ratio (1 + sqrt(5))/2, and psi = (1 - sqrt(5))/2. For even values of k, Fibonacci(k) = floor((phi^k)/sqrt(5)) since psi^(2*k)/sqrt(5) < 0.17^k for all k > 0, and from which the formula below.

Programs

  • Maple
    a:= n-> `if`(n=0, 1, floor(2^n*log[10]((1+sqrt(5))/2)-log[10](5)/2)+1):
    seq(a(n), n=0..35);  # Alois P. Heinz, Jul 30 2025
  • Mathematica
    a[n_] := IntegerLength[Fibonacci[2^n]]; Array[a, 30, 0] (* Amiram Eldar, Jul 30 2025 *)
    A385248[n_] := If[n == 0, 1, Floor[2^n*Log10[GoldenRatio] - Log10[5]/2] + 1];
    Array[A385248, 50, 0] (* Paolo Xausa, Aug 07 2025 *)
  • PARI
    a(n) = #Str(fibonacci(2^n)); \\ Michel Marcus, Jul 30 2025
  • Python
    from sympy import Rational, log, sqrt # uses symbolic computation
    phi = (1+sqrt(5))/2
    def a(n): return 1 if n==0 or n==1 else int(2**n *log(phi)/log(10)-Rational(1,2)*log(5)/log(10))+1
    

Formula

a(n) = A055642(A058635(n)).
a(n) = A060384(A000079(n)).
a(n) = floor(2^n * log10(phi) - (1/2) * log10(5)) + 1, for n >= 1.
Limit_{n->oo} a(n+1)/a(n) = 2.

Extensions

More terms from Michel Marcus, Jul 30 2025
a(29)-a(35) from Amiram Eldar, Jul 30 2025

A329192 Fibonacci numbers with arithmetic mean of digits an integer (sum of digits = a multiple of number of digits).

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 55, 144, 987, 6765, 10946, 9227465, 225851433717, 8944394323791464, 160500643816367088, 83621143489848422977, 59425114757512643212875125, 30960598847965113057878492344, 127127879743834334146972278486287885163
Offset: 1

Author

Keywords

Examples

			55 is a term as the arithmetic mean of digits is an integer: (5+5)/2 = 5.
144 is a term as the arithmetic mean of digits is an integer: (1+4+4)/3 = 3.
6765 is a term as the arithmetic mean of digits is an integer: (6+7+6+5)/4 = 6.
		

Crossrefs

Programs

  • Mathematica
    <
    				

Formula

a(n) = A000045(A164947(n+1)).
Previous Showing 11-18 of 18 results.