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.

A079354 a(1)=1; a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+3 otherwise.

This page as a plain text file.
%I A079354 #23 Jul 30 2025 11:20:02
%S A079354 1,4,7,6,9,8,7,6,5,8,11,14,17,16,19,18,17,16,15,18,21,24,27,26,29,28,
%T A079354 27,26,25,28,31,34,37,36,39,38,37,36,35,38,41,44,47,46,49,48,47,46,45,
%U A079354 48,51,54,57,56,59,58,57,56,55,58,61,64,67,66,69,68,67,66,65,68,71,74,77
%N A079354 a(1)=1; a(n)=a(n-1)-1 if n is already in the sequence, a(n)=a(n-1)+3 otherwise.
%C A079354 Starting with a(1)=0 and same definition, a(n)=n+(-1)^n (cf. A004442)
%H A079354 Michael De Vlieger, <a href="/A079354/b079354.txt">Table of n, a(n) for n = 1..10000</a>
%H A079354 Robbert Fokkink and Gandhar Joshi, <a href="https://arxiv.org/abs/2507.16956">On Cloitre's hiccup sequences</a>, arXiv:2507.16956 [math.CO], 2025. See p. 2.
%H A079354 <a href="/index/Rec#order_11">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,1,-1).
%F A079354 a(n)-n is periodic with period (0, 2, 4, 2, 4, 2, 0, -2, -4, -2) of length 10.
%F A079354 a(10t+i) = 10t+c_i, 1<=i<=10, c_i=(1, 4, 7, 6, 9, 8, 7, 6, 5, 8). a(n) = n iff n == 1 or 7 (mod 10).
%F A079354 G.f.: x*(2*x^10+3*x^9-x^8-x^7-x^6-x^5+3*x^4-x^3+3*x^2+3*x+1) / (x^11-x^10-x+1). - _Colin Barker_, Oct 16 2013
%t A079354 LinearRecurrence[{1,0,0,0,0,0,0,0,0,1,-1},{1,4,7,6,9,8,7,6,5,8,11},80] (* _Harvey P. Dale_, Feb 01 2015 *)
%o A079354 (PARI) Vec(x*(2*x^10+3*x^9-x^8-x^7-x^6-x^5+3*x^4-x^3+3*x^2+3*x+1)/(x^11-x^10-x+1) + O(x^100)) \\ _Colin Barker_, Oct 16 2013
%K A079354 nonn,easy
%O A079354 1,2
%A A079354 _Benoit Cloitre_ and _N. J. A. Sloane_, Feb 14 2003