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.

This page as a plain text file.
%I A381582 #7 Feb 28 2025 12:08:32
%S A381582 1,2,3,20,21,27,44,55,56,57,75,95,110,111,115,152,175,207,264,287,291,
%T A381582 304,305,344,364,365,377,380,395,398,399,404,425,435,455,534,584,605,
%U A381582 815,846,847,864,888,930,987,992,1004,1011,1024,1025,1064,1084,1085,1145,1182
%N A381582 Numbers k such that k and k+1 are both terms in A381581.
%C A381582 If k is not divisible by 3 (A001651), then A001906(k) = Fibonacci(2*k) is a term.
%H A381582 Amiram Eldar, <a href="/A381582/b381582.txt">Table of n, a(n) for n = 1..10000</a>
%e A381582 1 is a term since A291711(1) = 1 divides 1 and A291711(2) = 2 divides 2.
%e A381582 20 is a term since A291711(20) = 4 divides 20 and A291711(21) = 1 divides 21.
%t A381582 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] &]
%o A381582 (PARI) mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
%o A381582 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);}
%o A381582 list(lim) = {my(q1 = is1(1), q2); for(k = 2, lim, q2 = is1(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}
%Y A381582 Cf. A000045, A001906, A001651, A291711.
%Y A381582 Subsequence of A381581.
%Y A381582 Subsequences: A381583, A381584, A381585.
%Y A381582 Similar sequences: A328209, A330927, A330931, A351720.
%K A381582 nonn,easy,base
%O A381582 1,2
%A A381582 _Amiram Eldar_, Feb 28 2025