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.

A317335 a(n) = A317332(n) - 8*n.

This page as a plain text file.
%I A317335 #17 Oct 02 2024 16:47:18
%S A317335 1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,
%T A317335 1,-2,-2,1,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,
%U A317335 -2,1,1,-2,-2,1,-2,-2
%N A317335 a(n) = A317332(n) - 8*n.
%H A317335 A.H.M. Smeets, <a href="/A317335/b317335.txt">Table of n, a(n) for n = 1..20000</a>
%F A317335 a(4*n-3) = 1, a(4*n-1) = -2, a(2*n) = a(n) for n > 0.
%F A317335 abs(a(n)+1) = A014710(n-1).
%F A317335 abs(a(n)) = A014709(n-1).
%o A317335 (Python)
%o A317335 n, f, i, p, q = 1, 1, 0, 0, 1
%o A317335 while i < 1000000:
%o A317335     i, p, q = i+1, p*10, q*10
%o A317335     if i == f:
%o A317335         p, n = p+1, n+1
%o A317335         f = f*n
%o A317335 n, a, j = 0, 0, 0
%o A317335 while p%q > 0:
%o A317335     a, f, p, q = a+1, p//q, q, p%q
%o A317335     if f == 8:
%o A317335         n = n+1
%o A317335         print(n, a-1-8*n)
%Y A317335 Cf. A317331, A317332, A317333, A317336.
%K A317335 sign
%O A317335 1,3
%A A317335 _A.H.M. Smeets_, Jul 26 2018