login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A186042 Numbers of the form 2*k + 1, 3*k + 2, or 5*k + 3. 2

%I #28 Sep 08 2022 08:45:55

%S 1,2,3,5,7,8,9,11,13,14,15,17,18,19,20,21,23,25,26,27,28,29,31,32,33,

%T 35,37,38,39,41,43,44,45,47,48,49,50,51,53,55,56,57,58,59,61,62,63,65,

%U 67,68,69,71,73,74,75,77,78,79,80,81,83,85,86,87,88,89,91,92,93,95,97

%N Numbers of the form 2*k + 1, 3*k + 2, or 5*k + 3.

%C n is in the sequence iff n is in A005408 or in A016789 or in A016885.

%C First differences are periodic with period length 22. Least common multiple of 2, 3, 5 is 30; number of terms <= 30 is 22.

%H G. C. Greubel, <a href="/A186042/b186042.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_22">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-1).

%F a(n) = a(n-22) + 30.

%F a(n) = a(n-1) + a(n-22) - a(n-23).

%F G.f.: x*(x^21 + x^19 + x^17 + x^16 + x^15 + x^13 + x^11 + x^10 + x^8 + x^7 + x^6 + x^4 + x^3 + x^2 + 1) / ((x - 1)^2*(x^10 - x^9 + x^8 - x^7 + x^6 - x^5 + x^4 - x^3 + x^2 - x + 1)*(x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)).

%t LinearRecurrence[{2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-2,2,-1},{1,2,3,5,7,8,9,11,13,14,15,17,18,19,20,21,23,25,26,27,28,29},71] (* _Ray Chandler_, Jul 12 2015 *)

%o (Magma) IsA186042:=func< n | exists{ k: k in [0..n div 2] | n in [2*k+1, 3*k+2, 5*k+3] } >; [ n: n in [1..100] | IsA186042(n) ];

%o (PARI) isok(n) = (n % 2) || ((n % 3)==2) || ((n % 5)==3); \\ _Michel Marcus_, Jul 26 2017

%Y Cf. A005408, A016789, A016885.

%K nonn,easy

%O 1,2

%A _Klaus Brockhaus_, Feb 11 2011, Mar 09 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 11:24 EDT 2024. Contains 371967 sequences. (Running on oeis4.)