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.
%I A287865 #25 Feb 03 2025 14:11:55 %S A287865 1,3,7,5,11,23,47,19,13,3,7,5,11,23,47,19,13,3,7,5,11,23,47,19,13,3,7, %T A287865 5,11,23,47,19,13,3,7,5,11,23,47,19,13,3,7,5,11,23,47,19,13,3,7,5,11, %U A287865 23,47,19,13,3,7,5,11,23,47,19,13,3,7,5,11,23,47,19,13,3,7,5 %N A287865 a(n) = gpf(2*a(n-1)+1), with a(1)=1, where gpf = A006530. %C A287865 Periodic with period length 8. %D A287865 Oskars Rieksts, Email to N. J. A. Sloane, Jun 04 2017. %H A287865 Colin Barker, <a href="/A287865/b287865.txt">Table of n, a(n) for n = 1..1000</a> %H A287865 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,0,1). %F A287865 From _Colin Barker_, Jun 04 2017: (Start) %F A287865 G.f.: x*(1 + 3*x + 7*x^2 + 5*x^3 + 11*x^4 + 23*x^5 + 47*x^6 + 19*x^7 + 12*x^8) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)). %F A287865 a(n) = a(n-8) for n>9. (End) %p A287865 gpf:= n->max(1, op(numtheory[factorset](n))); # A006530 %p A287865 a:=[1]; i:=1; %p A287865 for n from 1 to 100 do i:=gpf(2*i+1); a:=[op(a),i]; od: %p A287865 a; %t A287865 LinearRecurrence[PadLeft[{1}, 8], {1, 3, 7, 5, 11, 23, 47, 19, 13}, 100] (* _Paolo Xausa_, Feb 02 2025 *) %o A287865 (Python) %o A287865 from sympy import primefactors %o A287865 l=[0, 1] %o A287865 for n in range(2, 77): %o A287865 l.append(primefactors(2*l[n - 1] + 1)[-1]) %o A287865 print(l[1:]) # _Indranil Ghosh_, Jun 04 2017 %o A287865 (PARI) Vec(x*(1 + 3*x + 7*x^2 + 5*x^3 + 11*x^4 + 23*x^5 + 47*x^6 + 19*x^7 + 12*x^8) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)) + O(x^100)) \\ _Colin Barker_, Jun 04 2017 %Y A287865 Cf. A006530. %K A287865 nonn,easy %O A287865 1,2 %A A287865 _N. J. A. Sloane_, Jun 04 2017