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.

A381582 Numbers k such that k and k+1 are both terms in A381581.

Original entry on oeis.org

1, 2, 3, 20, 21, 27, 44, 55, 56, 57, 75, 95, 110, 111, 115, 152, 175, 207, 264, 287, 291, 304, 305, 344, 364, 365, 377, 380, 395, 398, 399, 404, 425, 435, 455, 534, 584, 605, 815, 846, 847, 864, 888, 930, 987, 992, 1004, 1011, 1024, 1025, 1064, 1084, 1085, 1145, 1182
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

If k is not divisible by 3 (A001651), then A001906(k) = Fibonacci(2*k) is a term.

Examples

			1 is a term since A291711(1) = 1 divides 1 and A291711(2) = 2 divides 2.
20 is a term since A291711(20) = 4 divides 20 and A291711(21) = 1 divides 21.
		

Crossrefs

Subsequence of A381581.
Subsequences: A381583, A381584, A381585.
Similar sequences: A328209, A330927, A330931, A351720.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; q[n_] := q[n] = Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2; m -= 2*f[k], s++; m -= f[k]]]; Divisible[n, s]]; Select[Range[1200], q[#] && q[#+1] &]
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    is1(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2; m -= 2*f(k), s++; m -= f(k))); !(n % s);}
    list(lim) = {my(q1 = is1(1), q2); for(k = 2, lim, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}