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.

A047275 Numbers that are congruent to {0, 1, 6} mod 7.

This page as a plain text file.
%I A047275 #26 Sep 08 2022 08:44:56
%S A047275 0,1,6,7,8,13,14,15,20,21,22,27,28,29,34,35,36,41,42,43,48,49,50,55,
%T A047275 56,57,62,63,64,69,70,71,76,77,78,83,84,85,90,91,92,97,98,99,104,105,
%U A047275 106,111,112,113,118,119,120,125,126,127,132,133,134,139,140
%N A047275 Numbers that are congruent to {0, 1, 6} mod 7.
%C A047275 Nonnegative m such that floor(k*m^2/7) = k*floor(m^2/7), where k = 4, 5 or 6. See also the comment in A047299. [_Bruno Berselli_, Dec 03 2015]
%H A047275 Vincenzo Librandi, <a href="/A047275/b047275.txt">Table of n, a(n) for n = 1..1000</a>
%H A047275 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A047275 G.f.: x^2*(1+5*x+x^2) / ((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Oct 25 2011
%F A047275 From _Wesley Ivan Hurt_, Jun 10 2016: (Start)
%F A047275 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
%F A047275 a(n) = (21*n-21+12*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9.
%F A047275 a(3k) = 7k-1, a(3k-1) = 7k-6, a(3k-2) = 7k-7. (End)
%p A047275 A047275:=n->(21*n-21+12*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047275(n), n=1..100); # _Wesley Ivan Hurt_, Jun 10 2016
%t A047275 Select[Range[0, 120], Function[k, Mod[#, 7] == k] /@ Or[0, 1, 6] &] (* or *) Select[Range[0, 120], Function[k, Floor[k (#^2/7)] == k Floor[#^2/7]] /@ Or[4, 5, 6] &] (* _Michael De Vlieger_, Dec 03 2015 *)
%t A047275 LinearRecurrence[{1, 0, 1, -1}, {0, 1, 6, 7}, 100] (* _Vincenzo Librandi_, Jun 14 2016 *)
%o A047275 (PARI) concat(0, Vec(x^2*(1+5*x+x^2)/((1+x+x^2)*(x-1)^2) + O(x^100))) \\ _Altug Alkan_, Dec 03 2015
%o A047275 (Magma) [n : n in [0..150] | n mod 7 in [0, 1, 6]]; // _Wesley Ivan Hurt_, Jun 10 2016
%Y A047275 Cf. A047299.
%K A047275 nonn,easy
%O A047275 1,3
%A A047275 _N. J. A. Sloane_