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.

Previous Showing 21-30 of 42 results. Next

A093719 a(n) = (n mod 2)^(n mod 3).

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 12 2004

Keywords

Comments

This is a periodic sequence with period 6. The repeating block is 1,1,0,1,0,1. - Michel Dekking, Sep 19 2020

Crossrefs

Programs

Formula

a(n) = A000035(n)^A010872(n).
a(A047273(n)) = 1, a(A047235(n)) = 0. [Reinhard Zumkeller, Oct 01 2008]
G.f.: -(x^5 + x^3 + x + 1)/(x^6 - 1). - Colin Barker, Apr 01 2013
E.g.f.: (2*cos(sqrt(3)*x/2)*cosh(x/2) + cosh(x))/3 + sinh(x). - Stefano Spezia, Jul 26 2024

A098764 a(n) = 3p - q where p and q are consecutive primes.

Original entry on oeis.org

3, 4, 8, 10, 20, 22, 32, 34, 40, 56, 56, 70, 80, 82, 88, 100, 116, 116, 130, 140, 140, 154, 160, 170, 190, 200, 202, 212, 214, 212, 250, 256, 272, 268, 296, 296, 308, 322, 328, 340, 356, 352, 380, 382, 392, 386, 410, 442, 452, 454, 460, 476, 472, 496, 508, 520
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 30 2004

Keywords

Comments

Except for the initial term, a(n)=={2, 4} mod 6.
Not monotonic: a(29) = 214 > 212 = a(30), a(33) = 272 > 268 = a(34), etc. - Charles R Greathouse IV, Jun 03 2013

Crossrefs

Programs

  • Mathematica
    ListConvolve[{-1,3},Prime[Range[100]]] (* Paolo Xausa, Nov 02 2023 *)
  • PARI
    a(n) = 3*prime(n) - prime(n+1) \\ Michel Marcus, Jun 03 2013

Formula

a(n) = A001043(n) - 2*A001223(n).
a(n) = 3*A000040(n)-A000040(n+1) = A001748(n)-A000040(n+1) = A001747(n+1)-A001223(n). - R. J. Mathar, Apr 22 2010
a(n) ~ 2n log n. - Charles R Greathouse IV, Jun 03 2013
a(n) = A100021(n) + 3. - Hugo Pfoertner, Nov 02 2023
a(n) = A062234(n) + A000040(n). - Anthony S. Wright, Feb 19 2024

Extensions

Corrected (116 duplicated) by R. J. Mathar, Apr 22 2010

A235700 a(n+1) = a(n) + (a(n) mod 5), a(1)=1.

Original entry on oeis.org

1, 2, 4, 8, 11, 12, 14, 18, 21, 22, 24, 28, 31, 32, 34, 38, 41, 42, 44, 48, 51, 52, 54, 58, 61, 62, 64, 68, 71, 72, 74, 78, 81, 82, 84, 88, 91, 92, 94, 98, 101, 102, 104, 108, 111, 112, 114, 118, 121, 122, 124, 128, 131, 132, 134, 138, 141, 142, 144, 148, 151, 152, 154, 158, 161, 162, 164, 168, 171, 172, 174, 178, 181, 182, 184, 188, 191
Offset: 1

Views

Author

M. F. Hasler, Jan 14 2014

Keywords

Comments

Although the present sequence has not been thought of via "writing a(n) in base b", this could be seen as "base 5" version of A102039 (base 10) and A001651 (base 3), A047235 (base 6), A047350 (base 7) and A007612 (base 9). For 4 or 8 one would get a sequence constant from that (3rd resp. 4th) term on.

Crossrefs

Programs

  • Mathematica
    NestList[#+Mod[#,5]&,1,80] (* Harvey P. Dale, Oct 20 2024 *)
  • PARI
    is_A235700(n) = bittest(278,n%10) \\ 278=2^1+2^2+2^4+2^8
    
  • PARI
    A235700 = n -> 2^((n-1)%4)+(n-1)\4*10
    
  • PARI
    print1(a=1);for(i=1,99,print1(","a+=a%5))
    
  • PARI
    Vec(x*(2*x^3+2*x^2+1)/((x-1)^2*(x^2+1)) + O(x^100)) \\ Colin Barker, Jan 16 2014

Formula

a(n) = 2^(n-1 mod 4) + 10*floor((n-1)/4).
From Colin Barker, Jan 16 2014: (Start)
a(n) = (-10+(1+2*i)*(-i)^n+(1-2*i)*i^n+10*n)/4 where i=sqrt(-1).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4).
G.f.: x*(2*x^3+2*x^2+1) / ((x-1)^2*(x^2+1)). (End)
E.g.f.: (4 + 5*exp(x)*(x - 1) + cos(x) + 2*sin(x))/2. - Stefano Spezia, Feb 22 2025

A096689 Numbers n such that 2n^2 + 3n + 3 is prime.

Original entry on oeis.org

0, 2, 4, 10, 16, 20, 26, 34, 40, 44, 46, 50, 62, 64, 74, 76, 80, 82, 86, 92, 94, 110, 122, 140, 160, 164, 170, 176, 182, 200, 202, 212, 214, 220, 224, 232, 236, 250, 262, 296, 302, 304, 310, 320, 322, 326, 332, 344, 346, 352, 392, 400, 404, 422, 424, 446, 452
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Comments

All n are {2,4} (mod 6), as in A047235, because otherwise 2*n^2 + 3*n + 3 is a multiple of 2 or 3. - R. J. Mathar, Jul 17 2012

Crossrefs

Programs

Formula

a(n) = A096691(n)*2.

A104160 Primes equal to a sum of primes with differences congruent to (2,4) mod 6.

Original entry on oeis.org

353, 41, 131, 131, 311, 1181, 941, 1049, 1931, 2579, 3911, 4289, 4451, 6719, 8069, 10391, 10589, 12011, 14369, 26591, 31379, 33521, 35339, 41081, 43889, 58271, 59981, 63059, 64679, 66821, 115331, 74759, 77999, 78791, 80051, 80141, 83219, 87071, 94541, 96179
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 10 2005

Keywords

Comments

Consider finite ordered subsequences of at least 2 distinct primes A000040 subject to the conditions:
(i) the first differences of the subsequence are the initial terms of A047235,
(ii) the sum of the terms of the subsequence is a prime,
(iii) the subsequence is maximum in the sense that it cannot be extended by appending larger primes and still maintaining the conditions (i) and (ii).
Then the (prime) sum of the subsequence is one term of this sequence here.
The terms are inserted in order of the smallest prime in the subsequence.

Examples

			a(1)=353 because 353 = 5+7+11+19+29+43+59+79+101.
a(2)=41 because 41 = 11+13+17.
a(3)=131 because 131 = 17+19+23+31+41.
a(4)=131 because 131 = 41+43+47.
a(5)=311 because 311 = 101+103+107.
		

Extensions

41 inserted, 131 duplicated, 311 inserted and sequence extended and comment added by R. J. Mathar, Apr 23 2010

A116127 Number of numbers that are congruent to {2, 4} mod 6 between prime(n) and prime(n+1) inclusive.

Original entry on oeis.org

1, 1, 0, 2, 0, 2, 0, 2, 2, 0, 2, 2, 0, 2, 2, 2, 0, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0, 2, 4, 2, 2, 0, 4, 0, 2, 2, 2, 2, 2, 0, 4, 0, 2, 0, 4, 4, 2, 0, 2, 2, 0, 4, 2, 2, 2, 0, 2, 2, 0, 4, 4, 2, 0, 2, 4, 2, 4, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 0, 4, 0, 2, 2, 2, 2, 2, 0, 2, 4, 2, 2, 2, 2, 2, 4, 0, 6, 2, 4, 2, 2, 0, 2
Offset: 1

Views

Author

Giovanni Teofilatto, Apr 08 2007

Keywords

Comments

For n > 2,
A001223(n) = 2 iff a(n) = 0,
A001223(n) = 4 or 6 or 8 iff a(n) = 2,
A001223(n) = 10 or 12 or 14 iff a(n) = 4,
A001223(n) = 16 or 18 or 20 iff a(n) = 6,
and so on. This can be generalized to
A001223(n) = 3*k-2 or 3*k or 3*k+2 iff a(n) = k for k >= 2.

Crossrefs

Cf. A000040 (primes), A001223 (differences between consecutive primes), A047235 (numbers congruent to {2, 4} mod 6), A002654.

Programs

  • Magma
    [ #[ k: k in [NthPrime(n)..NthPrime(n+1)] | r eq 2 or r eq 4 where r is k mod 6 ]: n in [1..105] ]; /* Klaus Brockhaus, Apr 15 2007 */
  • Maple
    P:= select(isprime, [seq(i,i=5..1000,2)]):
    Delta:= P[2..-1]-P[1..-2]:
    f:= t -> (t + 2*(t+1 mod 3) - 2)/3:
    1,1,op(map(f, Delta)); # Robert Israel, Jun 19 2019
  • Mathematica
    s={};Do[c=0;Do[If[MemberQ[{2,4},Mod[i,6]],c=c+1],{i,Prime[n],Prime[n+1]}];AppendTo[s,c],{n,105}];s (* James C. McMahon, Aug 18 2024 *)

Extensions

Edited, corrected and extended by Klaus Brockhaus, Apr 15 2007

A123919 Number of numbers congruent to 2 or 4 mod 6 and <= n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 22, 22, 22, 22, 23, 23, 24, 24, 24, 24, 25, 25, 26, 26, 26
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 29 2006

Keywords

Comments

First differences of A056827. - R. J. Mathar, Nov 22 2008
a(n+2) is the graph radius of the n X n knight graph for n > 7. - Eric W. Weisstein, Nov 20 2019

Crossrefs

Programs

  • GAP
    a:=[0,1,1,2,2,2,2];; for n in [8..80] do a[n]:=a[n-1]+a[n-6]-a[n-7]; od; a; # G. C. Greubel, Aug 07 2019
    
  • Magma
    [Floor(n/2) - Floor(n/6) : n in [1..100]]; // Wesley Ivan Hurt, Apr 26 2021
  • Mathematica
    a[n_] := Floor[n/2] - Floor[n/6]; Array[a, 80] (* Robert G. Wilson v, Oct 29 2006 *)
    LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 1, 1, 2, 2, 2, 2}, 80] (* G. C. Greubel, Aug 07 2019 *)
  • PARI
    my(x='x+O('x^80)); concat([0], Vec(x^2*(1+x^2)/((1-x)*(1-x^6)))) \\ G. C. Greubel, Aug 07 2019
    
  • PARI
    a(n) = floor(n/2) - floor(n/6);  \\ Joerg Arndt, Nov 23 2019
    

Formula

a(n) = floor(n/2) - floor(n/6).
From R. J. Mathar, Nov 22 2008: (Start)
G.f.: x^2*(1+x^2)/((1+x)*(1-x)^2*(1+x+x^2)*(1-x+x^2)).
a(n+1) - a(n) = A120325(n+1). (End)
a(n) = A004526(n) - A152467(n). - Omar E. Pol, Nov 25 2019
a(n) = a(n-1)+a(n-6)-a(n-7). - Wesley Ivan Hurt, Apr 26 2021
a(n) = floor((2*n+3+(-1)^n)/6). - Adriano Caroli, Mar 14 2025

A131717 Natural numbers A000027 with 6n+4 and 6n+5 terms swapped.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15, 17, 16, 18, 19, 20, 21, 23, 22, 24, 25, 26, 27, 29, 28, 30, 31, 32, 33, 35, 34, 36, 37, 38, 39, 41, 40, 42, 43, 44, 45, 47, 46, 48, 49, 50, 51, 53, 52, 54, 55, 56, 57, 59, 58, 60, 61, 62, 63, 65, 64, 66, 67, 68, 69, 71, 70, 72
Offset: 1

Views

Author

Paul Curtz, Sep 15 2007

Keywords

Comments

Hexaperiodic differences: 1, 1, 2, -1, 2, 1; 0, 1, -3, 3, -1, 0 (even palindromic signed); 1,-4, 6, -4, 1, 0.

Crossrefs

Cf. A131042.

Programs

  • Maple
    seq(seq(6*i+s,s=[1,2,3,5,4,6]),i=0..100); # Robert Israel, Nov 11 2014
  • Mathematica
    Drop[CoefficientList[Series[x (2x^5 - x^4 + 2x^3 + x^2 + x + 1)/((x - 1)^2 (x + 1) (x^2 - x + 1) (x^2 + x + 1)), {x, 0, 100}], x], 1] (* Indranil Ghosh, Apr 18 2017 *)
    Table[Sum[(7 #1 - 13 #2 + 17 #3 - 3 #4 + 2 #5 + 2 #6)/30 & @@ Mod[k + Range[0, 5], 6], {k, 0, n}], {n, 0, 71}] (* Michael De Vlieger, Apr 22 2017 *)
  • PARI
    Vec(x*(2*x^5-x^4+2*x^3+x^2+x+1)/((x-1)^2*(x+1)*(x^2-x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 11 2014

Formula

a(n) = A008585(n/3) if n is congruent to 0 mod 3. - Frieder Mittmann, Nov 11 2014
a(n) = A007310((n-1)/3) if n is congruent to 1 mod 3. - Frieder Mittmann, Nov 11 2014
a(n) = A047235((n-2)/3) if n is congruent to 2 mod 3. - Frieder Mittmann, Nov 11 2014
G.f.: x*(2*x^5-x^4+2*x^3+x^2+x+1) / ((x-1)^2*(x+1)*(x^2-x+1)*(x^2+x+1)). - Colin Barker, Nov 11 2014
a(n) = (24*floor(n/6)-3*(n^2-3*n-2)-9*floor(n/3)*(3*floor(n/3)-2*n+3)+(-1)^floor(n/3)*(3*n^2-5*n-6+3*floor(n/3)*(9*floor(n/3)-6*n+5)))/4. - Luce ETIENNE, Apr 18 2017

A154264 Nonnegative numbers n such that 9*n^2 - 10*n + 3 is prime.

Original entry on oeis.org

0, 1, 2, 4, 8, 14, 22, 26, 28, 34, 38, 44, 46, 50, 52, 68, 70, 82, 86, 88, 100, 112, 118, 122, 124, 140, 146, 148, 152, 158, 170, 182, 188, 190, 196, 212, 224, 232, 236, 248, 256, 278, 280, 284, 286, 290, 292, 298, 310, 314, 334, 356, 374, 376, 380, 388, 394, 400
Offset: 1

Views

Author

Vincenzo Librandi, Feb 21 2009

Keywords

Comments

With the exception of the 1, all entries are == 2 (mod 6) or == 4 (mod 6), as in A047235, because otherwise 9*n^2-10*n+3 is divisible by 2 or 3. - R. J. Mathar, Jul 16 2012

Crossrefs

Cf. A154261.

Programs

Extensions

Edited by Robert Hochberg, Jun 21 2010

A203016 Numbers congruent to {1, 2, 3, 4} mod 6, multiplied by 3.

Original entry on oeis.org

3, 6, 9, 12, 21, 24, 27, 30, 39, 42, 45, 48, 57, 60, 63, 66, 75, 78, 81, 84, 93, 96, 99, 102, 111, 114, 117, 120, 129, 132, 135, 138, 147, 150, 153, 156, 165, 168, 171, 174, 183, 186, 189, 192, 201, 204, 207, 210, 219, 222, 225, 228, 237, 240, 243, 246, 255, 258, 261, 264, 273, 276, 279, 282, 291, 294, 297
Offset: 1

Views

Author

N. J. A. Sloane, Dec 27 2011

Keywords

Comments

Appears to coincide with the list of numbers n such that A006600(n) is not a multiple of n. Equals A047227 multiplied by 3.

Crossrefs

Programs

  • Magma
    [3*n : n in [0..100] | n mod 6 in [1..4]]; // Wesley Ivan Hurt, Jun 07 2016
  • Maple
    A203016:=n->3*(6*n-5-I^(2*n)+(1+I)*I^(1-n)+(1-I)*I^(n-1))/4: seq(A203016(n), n=1..100); # Wesley Ivan Hurt, Jun 07 2016
  • Mathematica
    3 Select[Range[100], MemberQ[{1, 2, 3, 4}, Mod[#, 6]] &] (* Wesley Ivan Hurt, Jun 07 2016 *)

Formula

From Wesley Ivan Hurt, Jun 07 2016: (Start)
G.f.: 3*x*(1+x+x^2+x^3+2*x^4)/((x-1)^2*(1+x+x^2+x^3)).
a(n) = 3*(6*n-5-i^(2*n)+(1+i)*i^(1-n)+(1-i)*i^(n-1))/4 where i=sqrt(-1).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(2k) = 3*A047235(k), a(2k-1) = 3*A047241(k). (End)
E.g.f.: 3*(4 + sin(x) - cos(x) + (3*x - 2)*sinh(x) + 3*(x - 1)*cosh(x))/2. - Ilya Gutkovskiy, Jun 07 2016
Previous Showing 21-30 of 42 results. Next