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-23 of 23 results.

A047370 Numbers that are congruent to {2, 3, 5} mod 7.

Original entry on oeis.org

2, 3, 5, 9, 10, 12, 16, 17, 19, 23, 24, 26, 30, 31, 33, 37, 38, 40, 44, 45, 47, 51, 52, 54, 58, 59, 61, 65, 66, 68, 72, 73, 75, 79, 80, 82, 86, 87, 89, 93, 94, 96, 100, 101, 103, 107, 108, 110, 114, 115, 117, 121, 122, 124, 128, 129, 131, 135, 136, 138, 142
Offset: 1

Views

Author

N. J. A. Sloane, Dec 11 1999

Keywords

Comments

Union of A017005, A017017 and A017041. - Michel Marcus, May 25 2014

Crossrefs

Programs

  • Magma
    [7*Floor((n-1)/3)+2^((n-1) mod 3)+1: n in [1..50]]; // Wesley Ivan Hurt, May 25 2014
    
  • Maple
    A047370:=n->7*floor((n-1)/3) + 2^((n-1) mod 3)+1; seq(A047370(n), n=1..50); # Wesley Ivan Hurt, May 25 2014
  • Mathematica
    Select[Range[200], MemberQ[{2,3,5}, Mod[#,7]]&] (* or *) LinearRecurrence[ {1,0,1,-1}, {2,3,5,9}, 60] (* Harvey P. Dale, Apr 29 2013 *)
    Table[7*Floor[(n - 1)/3] + 2^Mod[n - 1, 3] + 1, {n, 50}] (* Wesley Ivan Hurt, May 25 2014 *)
  • PARI
    x='x + O('x^50); Vec(x*(2+x+2*x^2+2*x^3)/((1+x+x^2)*(x-1)^2)) \\ G. C. Greubel, Feb 21 2017

Formula

G.f.: x*(2+x+2*x^2+2*x^3)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Dec 04 2011
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4, with a(1)=2, a(2)=3, a(3)=5, a(4)=9. - Harvey P. Dale, Apr 29 2013
a(n) = 7*floor((n-1)/3)+2^((n-1) mod 3)+1. - Gary Detlefs, May 25 2014
a(n) = (1/9)*(21*n+4*sqrt(3)*sin((2*Pi*n)/3)-6*cos((2*Pi*n)/3)-12). - Alexander R. Povolotsky, May 25 2014
a(3k) = 7k-2, a(3k-1) = 7k-4, a(3k-2) = 7k-5. - Wesley Ivan Hurt, Jun 10 2016

Extensions

More terms from Wesley Ivan Hurt, May 25 2014

A154611 Numbers n such that 7*n+3 is not prime.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 33, 35, 36, 37, 39, 41, 42, 43, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79
Offset: 1

Views

Author

Vincenzo Librandi, Jan 15 2009

Keywords

Comments

The even terms are the integer values of (4*h*k + 2*k + 2*h - 2)/7, where h and k are positive integers. - Vincenzo Librandi, Jan 17 2013
The corresponding composite numbers are 10, 24, 38, 45, 52, 66, 80, 87, 94, 108, 115, 122, 129, ... - Michael B. Porter, Jan 17 2013

Crossrefs

Programs

  • Magma
    [n: n in [0..80] | not IsPrime(7*n+3)]; // Vincenzo Librandi, Apr 05 2013
  • Mathematica
    With[{nn=100},Sort[Join[Range[1,nn-1,2],Select[Range[0,nn,2], !PrimeQ[ 7#+3]&]]]] (* Harvey P. Dale, Aug 22 2012 *)
    Select[Range[0, 100], !PrimeQ[7 # + 3]&] (* Vincenzo Librandi, Apr 05 2013 *)

Extensions

Erroneous comments deleted by N. J. A. Sloane, Jun 23 2010

A361226 Square array T(n,k) = k*((1+2*n)*k - 1)/2; n>=0, k>=0, read by antidiagonals upwards.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 2, 5, 3, 0, 3, 9, 12, 6, 0, 4, 13, 21, 22, 10, 0, 5, 17, 30, 38, 35, 15, 0, 6, 21, 39, 54, 60, 51, 21, 0, 7, 25, 48, 70, 85, 87, 70, 28, 0, 8, 29, 57, 86, 110, 123, 119, 92, 36, 0, 9, 33, 66, 102, 135, 159, 168, 156, 117, 45
Offset: 0

Views

Author

Paul Curtz, Mar 05 2023

Keywords

Comments

The main diagonal is A002414.
The first upper diagonal is A160378(n+1).
The antidiagonals sums are A034827(n+2).
b(n) = (A034827(n+3) = 0, 2, 10, 30, 70, ...) - (A002414(n) = 0, 1, 9, 30, 70, ...) = 0, 1, 1, 0, 0, 5, 21, 56, ... .
b(n+2) = A299120(n). b(n+4) = A033275(n). b(n+4) - b(n) = A002492(n).

Examples

			The rows are
  0, 0,  1,  3,  6,  10,  15,  21, ...   = A161680
  0, 1,  5, 12, 22,  35,  51,  70, ...   = A000326
  0, 2,  9, 21, 38,  60,  87, 119, ...   = A005476
  0, 3, 13, 30, 54,  85, 123, 168, ...   = A022264
  0, 4, 17, 39, 70, 110, 159, 217, ...   = A022266
  ... .
Columns: A000004, A001477, A016813, A017197=3*A016777, 2*A017101, 5*A016873, 3*A017581, 7*A017017, ... (coefficients from A026741).
Difference between two consecutive rows: A000290. Hence A143844.
This square array read by antidiagonals leads to the triangle
  0
  0   0
  0   1   1
  0   2   5   3
  0   3   9  12   6
  0   4  13  21  22  10
  0   5  17  30  38  35  15
  ... .
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := k*((2*n + 1)*k - 1)/2; Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Mar 05 2023 *)
  • PARI
    a(n) = { my(row = (sqrtint(8*n+1)-1)\2, column = n - binomial(row + 1, 2)); binomial(column, 2) + column^2 * (row - column) } \\ David A. Corneth, Mar 05 2023
    
  • Python
    # Seen as a triangle:
    from functools import cache
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0: return [0]
        r = Trow(n - 1)
        return [r[k] + k * k if k < n else r[n - 1] + n - 1 for k in range(n + 1)]
    for n in range(7): print(Trow(n)) # Peter Luschny, Mar 05 2023

Formula

Take successively sequences n*(n-1)/2, n*(3*n-1)/2, n*(5*n-1)/2, ... listed in the EXAMPLE section.
G.f.: y*(x + y)/((1 - y)^3*(1 - x)^2). - Stefano Spezia, Mar 06 2023
E.g.f.: exp(x+y)*y*(2*x + y + 2*x*y)/2. - Stefano Spezia, Feb 21 2024
Previous Showing 21-23 of 23 results.