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.

A277617 Lexicographically earliest positive sequence such that a(n+1)-a(n) is a square > 1 and no number occurs twice; a(1) = 1.

This page as a plain text file.
%I A277617 #19 Jan 16 2025 06:55:02
%S A277617 1,5,9,13,4,8,12,3,7,11,2,6,10,14,18,22,26,17,21,25,16,20,24,15,19,23,
%T A277617 27,31,35,39,30,34,38,29,33,37,28,32,36,40,44,48,52,43,47,51,42,46,50,
%U A277617 41,45,49,53,57,61,65,56,60,64,55,59,63,54,58,62,66,70,74,78,69,73,77,68,72,76,67,71,75,79,83,87,91,82,86,90,81,85,89,80,84,88
%N A277617 Lexicographically earliest positive sequence such that a(n+1)-a(n) is a square > 1 and no number occurs twice; a(1) = 1.
%C A277617 A variant of A277616, which is defined in the same way but starts with a(0) = 0.
%C A277617 Another variant is A277618, which is defined in a similar way, but with primes instead of squares. (The strictly positive variant is A065186.)
%H A277617 Paolo Xausa, <a href="/A277617/b277617.txt">Table of n, a(n) for n = 1..10000</a>
%H A277617 <a href="/index/Rec#order_14">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,0,0,0,0,1,-1).
%F A277617 From _Chai Wah Wu_, Mar 30 2023: (Start)
%F A277617 a(n) = a(n-1) + a(n-13) - a(n-14) for n > 14.
%F A277617 G.f.: x*(3*x^13 + 4*x^12 + 4*x^11 - 9*x^10 + 4*x^9 + 4*x^8 - 9*x^7 + 4*x^6 + 4*x^5 - 9*x^4 + 4*x^3 + 4*x^2 + 4*x + 1)/(x^14 - x^13 - x + 1). (End)
%t A277617 LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 5, 9, 13, 4, 8, 12, 3, 7, 11, 2, 6, 10, 14}, 100] (* _Paolo Xausa_, Jan 16 2025 *)
%o A277617 (PARI) {u=[a=1];(chk(n)=(!#u||(n>u[1]&&!setsearch(u,n)))&&(u=setunion(u,[n]))&&!while(#u>1&&u[2]==u[1]+1,u=u[^1]));for(n=1,99,print1(a",");for(k=-sqrtint(a+!a-1),9e9,k^2>1||next;chk(a+k*abs(k))||next;a+=k*abs(k);break))}
%Y A277617 Cf. A277616, A277618, A065186.
%K A277617 nonn,easy
%O A277617 1,2
%A A277617 _Eric Angelini_ and _M. F. Hasler_, Oct 23 2016