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.

A047390 Numbers that are congruent to {0, 3, 5} mod 7.

This page as a plain text file.
%I A047390 #47 Sep 08 2022 08:44:57
%S A047390 0,3,5,7,10,12,14,17,19,21,24,26,28,31,33,35,38,40,42,45,47,49,52,54,
%T A047390 56,59,61,63,66,68,70,73,75,77,80,82,84,87,89,91,94,96,98,101,103,105,
%U A047390 108,110,112,115,117,119,122,124,126,129,131,133,136,138,140,143
%N A047390 Numbers that are congruent to {0, 3, 5} mod 7.
%C A047390 Also numbers k such that k*(k+2)*(k+4) is divisible by 7. - _Bruno Berselli_, Dec 28 2017
%H A047390 Daniel Starodubtsev, <a href="/A047390/b047390.txt">Table of n, a(n) for n = 1..10000</a>
%H A047390 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A047390 a(n) = 2*n + floor(n/3) + (n^2 mod 3), with offset 0, a(0)=0. - _Gary Detlefs_, Mar 19 2010
%F A047390 From _Bruno Berselli_, Mar 29 2011: (Start)
%F A047390 G.f.: x^2*(3 + 2*x + 2*x^2)/((1 - x)^2*(1 + x + x^2)).
%F A047390 a(n) = (1/3)*(7*n - 6 - A049347(n-1)) = A047391(n) - A079978(n-1). (End)
%F A047390 a(n) = n + ceiling(4*(n-1)/3) - 1. - _Arkadiusz Wesolowski_, Sep 18 2012
%F A047390 a(n) = 2*(n-1) + ceiling((n-1)/3). - _Karl V. Keller, Jr._, Nov 01 2014
%F A047390 From _Wesley Ivan Hurt_, Jun 10 2016: (Start)
%F A047390 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
%F A047390 a(n) = 7*n/3 - 2 - 2*sin(2*n*Pi/3)/(3*sqrt(3)).
%F A047390 a(3*k) = 7*k-2, a(3*k-1) = 7*k-4, a(3*k-2) = 7*k-7. (End)
%p A047390 seq(2*n+floor(n/3)+(n^2 mod 3), n=0..52); # _Gary Detlefs_, Mar 19 2010
%t A047390 Select[Range[0,150], MemberQ[{0,3,5}, Mod[#,7]]&] (* _Harvey P. Dale_, Dec 07 2011 *)
%t A047390 CoefficientList[Series[x (3 + 2 x + 2 x^2)/((1 - x)^2 (1 + x + x^2)), {x, 0, 70}], x] (* _Vincenzo Librandi_, Nov 02 2014 *)
%o A047390 (Magma) [n: n in [0..122] | n mod 7 in [0, 3, 5]];  // _Bruno Berselli_, Mar 29 2011
%o A047390 (Python)
%o A047390 import math
%o A047390 a = lambda n: 2*(n-1)+math.ceil((n-1)/3.0)
%o A047390 for n in range(1,101): print(a(n), end = ", ") # _Karl V. Keller, Jr._, Nov 01 2014
%o A047390 (PARI) is(n)=!!setsearch([0,3,5],n%7) \\ _Charles R Greathouse IV_, Nov 09 2014
%o A047390 (PARI) a(n)=(7*n-5)\3 \\ _Charles R Greathouse IV_, Nov 09 2014
%Y A047390 Cf. A011655, A047391, A049347, A079978.
%K A047390 nonn,easy
%O A047390 1,2
%A A047390 _N. J. A. Sloane_