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.

A068718 Boustrophedon transform of A068717 with A068717(1) = -1 instead of 0.

This page as a plain text file.
%I A068718 #9 Jun 15 2022 01:50:18
%S A068718 1,2,2,2,8,25,90,404,2055,11792,75053,525622,4015361,33231679,
%T A068718 296182315,2828335731,28809181418,311788442591,3572832236720,
%U A068718 43216177809190,550245463265240,7356239983352887,103028812072639378
%N A068718 Boustrophedon transform of A068717 with A068717(1) = -1 instead of 0.
%C A068718 Signs omitted, all terms < 0. A068717(1) = -1 means soluble (1*1 -1*0*0 = +1 resp. 0*0 -1*1*1 = -1).
%o A068718 (Python)
%o A068718 from itertools import accumulate, count, islice
%o A068718 from math import isqrt
%o A068718 from sympy import continued_fraction_periodic
%o A068718 def A068718_gen(): # generator of terms
%o A068718     yield 1
%o A068718     blist = (1,)
%o A068718     for n in count(2):
%o A068718         yield (blist := tuple(accumulate(reversed(blist),initial=0 if (a:=isqrt(n)**2==n) else (1 if len(continued_fraction_periodic(0,1,n)[1]) & 1 else int(a)-1))))[-1]
%o A068718 A068718_list = list(islice(A068718_gen(),40)) # _Chai Wah Wu_, Jun 14 2022
%Y A068718 Cf. A068716, A068717, A049240, A046951.
%K A068718 nonn,easy
%O A068718 0,2
%A A068718 _Frank Ellermann_, Feb 26 2002