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: Brandon Avila

Brandon Avila's wiki page.

Brandon Avila has authored 10 sequences.

A233526 Start with a(1) = 1, a(2) = 3, then a(n)*2^k = a(n+1) + a(n+2), with 2^k the smallest power of 2 (k>0) such that all terms a(n) are positive integers.

Original entry on oeis.org

1, 3, 1, 5, 3, 7, 5, 9, 1, 17, 15, 19, 11, 27, 17, 37, 31, 43, 19, 67, 9, 125, 19, 231, 73, 389, 195, 583, 197, 969, 607, 1331, 1097, 1565, 629, 2501
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Dec 11 2013

Keywords

Comments

Define 2-free Fibonacci numbers as sequences where b(n) = (b(n-1) + b(n-2))/2^i such that 2^i is the greatest power of 2 that divides b(n-1) + b(n-2). Read backwards from the n-th term, this sequence produces a subsequence of 2-free Fibonacci numbers where we must divide by a power of 2 every time we add.
For other examples of n-free Fibonacci numbers, see A232666, A214684, A224382.

Crossrefs

Cf. A233525.

Programs

  • Python
    def minDivisionRich(n, a=1, b=3):
        yield a
        yield b
        for i in range(2, n):
            a *= 2
            while a <= b:
                a *= 2
            a, b = b, a - b
            yield b

A233525 Start with a(1) = 1, a(2) = 1, then a(n)*3^k = a(n+1) + a(n+2), with 3^k the smallest power of 3 (k>0) such that all terms a(n) are positive integers.

Original entry on oeis.org

1, 1, 2, 1, 5, 4, 11, 1, 32, 49, 47, 100, 41, 259, 110, 667, 323, 1678, 1229, 3805, 7256, 4159, 17609, 19822, 33005, 26461, 72554, 6829, 210833, 342316, 290183, 736765, 133784, 2076511, 1535657
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Dec 11 2013

Keywords

Comments

Define 3-free Fibonacci numbers as sequences where b(n) = (b(n-1) + b(n-2))/3^i such that 3^i is the greatest power of 2 that divides b(n-1) + b(n-2). Read backwards from the n-th term, this sequence produces a subsequence of 3-free Fibonacci numbers where we must divide by a power of 3 every time we add.
For other examples of n-free Fibonacci numbers, see A232666, A214684, A224382.

Crossrefs

Cf. A233526.

Programs

  • Python
    def minDivisionRich(n, a=1, b=1):
        yield a
        yield b
        for i in range(2, n):
            a *= 3
            while a <= b:
                a *= 3
            a, b = b, a - b
            yield b

A233248 The average cycle length of cycles in Fibonacci-like sequences modulo n over all starting pairs of remainders.

Original entry on oeis.org

1, 2, 7, 5, 17, 18, 16, 10, 22, 42, 10, 21, 28, 39, 32, 21, 36, 23, 18, 48, 16, 24, 48, 22, 84, 70, 66, 45, 14, 79, 30, 41, 36, 36, 66, 24, 76, 18, 53, 50, 40, 40, 88, 28, 93, 48, 32, 24, 110, 210, 68, 80, 108, 67, 20, 47, 66, 34, 58, 91, 60, 30
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Dec 06 2013

Keywords

Comments

a(n) = round(A233246(n)/n^2).
If n is in A064414, then a(n) is the average distance between two neighboring multiples of n.
If n is in A064414, then a(n)/2 is the average distance to the next zero over all starting pairs of remainders.

Examples

			For n=4 there are four possible cycles: A trivial cycle of length 1: 0; two cycles of length 6: 0,1,1,2,3,1; and a cycle of length 3: 0,2,2. Hence, a(4) = round((1+9+36+36)/16) = 5.
		

Crossrefs

Programs

  • Mathematica
    cl[i_, j_, n_] := (step = 1; first = i; second = j;
      next = Mod[first + second, n];
      While[second != i || next != j, step++; first = second;
       second = next; next = Mod[first + second, n]]; step)
    Table[Round[
      Total[Flatten[Table[cl[i, j, n], {i, 0, n - 1}, {j, 0, n - 1}]]]/
       n^2], {n, 70}]

A233246 Sum of squares of cycle lengths for different cycles in Fibonacci-like sequences modulo n.

Original entry on oeis.org

1, 10, 65, 82, 417, 650, 769, 658, 1793, 4170, 1151, 3026, 4705, 7690, 7137, 5266, 10369, 7562, 6319, 19218, 6977, 11510, 25345, 12818, 52417, 47050, 48449, 35410, 11565, 71370, 28351, 42130, 39615, 41482, 81057, 30674, 103969, 25282, 80033
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Dec 06 2013

Keywords

Comments

Here Fibonacci-like means a sequence following the Fibonacci recursion: b(n)=b(n-1)+b(n-2). These sequences modulo n cycle. The number of different cycles is A015134(n).
This sequence divided by n^2 is the average cycle length per different starting pairs modulo n, see A233248.
If n is in A064414, then a(n)/n^2 is the average distance between two neighboring multiples of n.
If n is in A064414, then a(n)/2n^2 is the average distance to the next zero over all starting pairs of remainders.

Examples

			For n=4 there are four possible cycles: A trivial cycle of length 1: 0; two cycles of length 6: 0,1,1,2,3,1; and a cycle of length 3: 0,2,2. Hence, a(4)=1+9+36+36=82.
		

Crossrefs

Programs

  • Mathematica
    cl[i_, j_, n_] := (step = 1; first = i; second = j;
      next = Mod[first + second, n];
      While[second != i || next != j, step++; first = second;
       second = next; next = Mod[first + second, n]]; step)
    Table[Total[
      Flatten[Table[cl[i, j, n], {i, 0, n - 1}, {j, 0, n - 1}]]], {n, 50}]

A232658 Numbers that are factors of Lucas numbers, whose multiples do not appear in some other Fibonacci-like sequence.

Original entry on oeis.org

11, 18, 19, 22, 29, 31, 38, 41, 44, 46, 47, 54, 58, 59, 62, 71, 76, 79, 82, 94, 101, 107, 116, 118, 121, 123, 124, 129, 131, 139, 142, 151, 158, 161, 162, 166, 179, 181, 191, 199, 201, 202, 209, 211, 214, 229, 236, 239, 241, 242, 246, 249, 251, 258, 262, 263, 271
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Nov 27 2013

Keywords

Comments

Intersection of A230457 and A065156.
Sequence A230457 from which elements of A064362 are removed.

Examples

			Sequence A000285 is the Fibonacci-like sequence starting with 1 and 4. This sequence doesn't contain multiples of 11. On the other hand Lucas numbers contain multiples of 11. Therefore, 11 belongs to this sequence.
		

Crossrefs

A232666 6-free Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 4, 93, 97, 190, 287, 477, 764, 1241, 2005, 541, 2546, 3087, 5633, 8720, 14353, 23073, 37426, 60499, 97925, 26404, 124329, 150733, 275062, 425795, 700857, 1126652, 1827509, 2954161, 796945, 3751106, 4548051, 8299157, 12847208, 21146365, 33993573
Offset: 0

Author

Brandon Avila and Tanya Khovanova, Nov 27 2013

Keywords

Comments

The sequences of n-free Fibonacci numbers were suggested by John H. Conway.
a(n) is the sum of the two previous terms divided by the largest possible power of 6.
4-free Fibonacci numbers are A224382.
The sequence coincides with the Fibonacci sequence until the first multiple of 6 in the Fibonacci sequence: 144, which in this sequence is divided by 36 to produce 4.
7-free Fibonacci numbers is A078414.

Crossrefs

Programs

  • Mathematica
    sixPower[n_] := (a = Transpose[FactorInteger[n]]; a2 = Position[a[[1]], 2]; a3 = Position[a[[1]], 3]; If[Length[a2] == 0 || Length[a3] == 0 , res = 0, res = Min[a[[2]][[a2[[1]][[1]]]], a[[2]][[a3[[1]][[1]]]]]]; res); sixFree[n_] := n/6^sixPower[n]; appendNext6Free[list_] := Append[list, sixFree[list[[-1]] + list[[-2]]]]; Nest[appendNext6Free, {0, 1}, 50]

A232656 The number of pairs of numbers below n that, when generating a Fibonacci-like sequence modulo n, contain zeros.

Original entry on oeis.org

1, 4, 9, 16, 21, 36, 49, 40, 81, 84, 101, 96, 85, 196, 189, 136, 145, 180, 325, 336, 153, 404, 529, 216, 521, 340, 729, 496, 393, 756, 901, 520, 509, 292, 1029, 384, 685, 652, 765, 840, 801, 612, 1849, 1016, 1701, 1060, 737, 504, 2401, 2084, 1305, 1360, 1405, 1476, 521, 1096, 1629, 1572
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Nov 27 2013

Keywords

Comments

a(n) = n^2 iff n is in A064414, a(n) is not equal to n^2 iff n is in A230457.
a(n) + A232357(n) = n^2.

Examples

			The sequence 2,1,3,4,2,1 is the sequence of Lucas numbers modulo 5. Lucas numbers are never divisible by 5. The 4 pairs (2,1), (1,3), (3,4), (4,2) are the only pairs that can generate a sequence modulo 5 that doesn't contain zeros. Thus, a(5) = 21, as 21 other pairs generate sequences that do contain zeros.
Any Fibonacci like sequence contains elements divisible by 2, 3, or 4. Thus, a(2) = 4, a(3) = 9, a(4) = 16.
		

Crossrefs

Programs

  • Mathematica
    fibLike[list_] := Append[list, list[[-1]] + list[[-2]]]; Table[k^2 -Count[Flatten[Table[Count[Nest[fibLike, {n, m}, k^2]/k, _Integer], {n, k - 1}, {m, k - 1}]], 0], {k, 70}]

Formula

Conjecture: a(n) = Sum_{d|n} phi(d)*A001177(d), where phi = Euler's totient function (A000010). - Logan J. Kleinwaks, Oct 28 2017
a(n) = Sum_{d|n} phi(d)*A001177(d) = Sum_{k=1..n} A001177(n/gcd(n,k)) = Sum_{k=1..n} A001177(gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 09 2021

A232357 The number of pairs of numbers below n that, when generating a Fibonacci-like sequence modulo n, do not contain zero.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 0, 24, 0, 16, 20, 48, 84, 0, 36, 120, 144, 144, 36, 64, 288, 80, 0, 360, 104, 336, 0, 288, 448, 144, 60, 504, 580, 864, 196, 912, 684, 792, 756, 760, 880, 1152, 0, 920, 324, 1056, 1472, 1800, 0, 416, 1296, 1344, 1404, 1440, 2504, 2040, 1620, 1792, 116, 1584, 2820, 2040, 2880
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Nov 22 2013

Keywords

Comments

a(n) = 0 iff n is in A064414, a(n) is not equal to zero iff n is in A230457.
a(n) + A232656(n) = n^2.

Examples

			The sequence 2,1,3,4,2,1 is the sequence of Lucas numbers modulo 5. Lucas numbers are never divisible by 5. The 4 pairs (2,1), (1,3), (3,4), (4,2) are the only pairs that can generate a sequence modulo 5 that doesn't contain zeros. Thus, a(5) = 4.
Any Fibonacci like sequence contains elements divisible by 2, 3, or 4. Thus, a(2) = a(3) = a(4) = 0.
		

Crossrefs

Programs

  • Mathematica
    fibLike[list_] := Append[list, list[[-1]] + list[[-2]]]; Table[Count[Flatten[Table[Count[Nest[fibLike, {n, m}, k^2]/k, _Integer], {n, k-1}, {m, k-1}]], 0], {k, 70}]

A230457 Numbers k such that there exists a Fibonacci-like sequence without multiples of k.

Original entry on oeis.org

5, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 99, 100
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Oct 19 2013

Keywords

Comments

This sequence is a complement of A064414.
The primes in the sequence are A230359.

Examples

			The Lucas numbers form a Fibonacci-like sequence such that no term is divisible by 5.
		

Crossrefs

Programs

  • Mathematica
    selQ[n_] := Do[test = Do[ If[ Divisible[ Fibonacci[k-2]*i + Fibonacci[k-1]*j, n], Return[True]], {k, 1, 2*n}]; If[test == Null, Return[False]], {i, 1, Floor[Sqrt[n]]}, {j, 1, Floor[Sqrt[n]]}]; Reap[ Do[ If[ selQ[n] =!= Null, Sow[n]], {n, 1, 100}]][[2, 1]] (* Jean-François Alcover, Oct 21 2013 *)

A230359 Prime numbers p such that their Fibonacci entry points are less than p+1.

Original entry on oeis.org

5, 11, 13, 17, 19, 29, 31, 37, 41, 47, 53, 59, 61, 71, 73, 79, 89, 97, 101, 107, 109, 113, 131, 137, 139, 149, 151, 157, 173, 179, 181, 191, 193, 197, 199, 211, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 373, 379, 389, 397, 401, 409, 419, 421, 431, 433, 439, 449, 457, 461, 479, 491, 499
Offset: 1

Author

Brandon Avila and Tanya Khovanova, Oct 16 2013

Keywords

Comments

For these primes p there exists a Fibonacci like sequence that doesn't contain multiples of p.
For other primes p the Fibonacci entry points are p+1. These primes are sequence A000057: Primes dividing all Fibonacci sequences.

Crossrefs

A002144 is a subsequence.

Programs

  • Maple
    filter:= proc(n) local i,a,b,c;
      if not isprime(n) then return false fi;
      a:= 0; b:= 1;
      for i from 1 to n-1 do
       c:= b;
       b:= a+b mod n; if b = 0 then return true fi;
       a:= c;
      od;
    false
    end proc:
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Sep 01 2020
  • Mathematica
    A001177[n_] := For[k = 1, True, k++, If[Divisible[Fibonacci[k], n], Return[k]]]; A230359 = Reap[For[p = 2, p <= 499, p = NextPrime[p], If[A001177[p] < 1+p, Sow[p]]]][[2, 1]] (* Jean-François Alcover, Oct 21 2013 *)
  • Sage
    def isA230359(p):
        return any(p.divides(fibonacci(k)) for k in (1..p))
    print([p for p in primes(1, 500) if isA230359(p)]) # Peter Luschny, Nov 01 2019

Formula

{p in A000040: A001177(p) < 1+p}.