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.

Showing 1-10 of 17 results. Next

A127852 Numbers n such that A118679(n) = 1.

Original entry on oeis.org

1, 3, 10, 19, 24, 30, 43, 51, 58, 62, 73, 75, 82, 94, 101, 106, 115, 116, 118, 128, 138, 147, 149, 159, 160, 163, 167, 172, 183, 186, 190, 191, 195, 201, 211, 214, 219, 249, 250, 252, 253, 260, 266, 272, 274, 277, 279, 283, 290, 294, 296, 306, 309, 310, 318
Offset: 1

Views

Author

Alexander Adamchuk, Feb 03 2007

Keywords

Comments

A118679[ a(n) ] = 1, where A118679(n) = {1, 2, 1, 13, 19, 13, 17, 43, 53, 1, 19, ...} = Absolute value of numerator of determinant of n X n matrix with M(i,j) = i/(i+1) if i=j otherwise 1. A118679(n) = Numerator[ (n^2+3n-2)/(2(n+1)!) ] = Numerator[ ((2n+3)^2-17)/(4(n+1)!) ].

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],Numerator[(#^2+3#-2)/(2(#+1)!)]==1&]

Formula

An integer n is in this sequence iff all prime divisors of n^2+3n-2 do not exceed n+1 and n^2+3n-2 is not of the form 2*p^2 for some prime p. [From Max Alekseyev, Jun 02 2009]

A166945 Records of first differences of A166944.

Original entry on oeis.org

2, 3, 7, 13, 43, 139, 313, 661, 1321, 2659, 5419, 10891, 22039, 44383, 88801, 177841, 355723, 713833, 1427749, 2860771, 5725453, 11461141, 22933441, 45895573, 91793059, 183616423, 367232911, 734482123, 1468965061, 2937930211, 5875882249, 11751795061, 23503590559, 47007181621, 94014363763
Offset: 1

Views

Author

Vladimir Shevelev, Oct 24 2009, Nov 05 2009

Keywords

Comments

Conjecture. Each term of the sequence is the greater of a pair of twin primes (A006512).

Crossrefs

Programs

  • Mathematica
    Reap[Print[old = r = 2]; Sow[old]; For[n = 2, n <= 10^6, n++, d = GCD[old, If[OddQ[n], n-2, n]]; If[d>r, r=d; Print[d]; Sow[d]]; old += d]][[2, 1]] (* Jean-François Alcover, Nov 03 2018, from PARI *)
  • PARI
    print1(old=r=2); for(n=2,1e11, d=gcd(old,if(n%2,n-2,n)); if(d>r, r=d; print1(", "d)); old+=d) \\ Charles R Greathouse IV, Oct 13 2017

Extensions

6 more terms from R. J. Mathar, Nov 19 2009; extension beginning with a(19) from Benoit Cloitre (private communication to Vladimir Shevelev)
a(25), a(26) from D. S. McNeil, Dec 13 2010
a(27)-a(30) from Charles R Greathouse IV, Oct 13 2017
a(31)-a(35) from Charles R Greathouse IV, Oct 17 2017

A090585 Numerator of (Sum_{k=1..n} k) / (Product_{k=1..n} k).

Original entry on oeis.org

1, 3, 1, 5, 1, 7, 1, 1, 1, 11, 1, 13, 1, 1, 1, 17, 1, 19, 1, 1, 1, 23, 1, 1, 1, 1, 1, 29, 1, 31, 1, 1, 1, 1, 1, 37, 1, 1, 1, 41, 1, 43, 1, 1, 1, 47, 1, 1, 1, 1, 1, 53, 1, 1, 1, 1, 1, 59, 1, 61, 1, 1, 1, 1, 1, 67, 1, 1, 1, 71, 1, 73, 1, 1, 1, 1, 1, 79, 1, 1, 1, 83, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 03 2003

Keywords

Comments

If the offset is set to 2 then [a(n) <> 1] is the indicator function of the odd primes ([] Iverson bracket). [Peter Luschny, Jul 05 2009]

Examples

			For n=5, (1+2+3+4+5)/(1*2*3*4*5) = 15/120 = 1/8, so a(5) = 1. For n=6, (1+2+3+4+5+6)/(1*2*3*4*5*6) = 21/720 = 7/240, so a(6) = 7. - _Michael B. Porter_, Jul 02 2016
		

Crossrefs

Denominator = A090586.

Programs

  • Maple
    a := n -> denom(2*n!/(n+1)); # Peter Luschny, Jul 05 2009
  • Mathematica
    With[{nn=100},Numerator[Accumulate[Range[nn]]/Rest[FoldList[Times,1,Range[nn]]]]] (* Harvey P. Dale, Sep 09 2014 *)
  • PARI
    for(n=1,100,print1(gcd(n*(n+1)/2,round(factorial(n))+1),", ")); \\ Jaume Oliver Lafont, Jan 23 2009

Formula

a(n) = A000217(n) / A069268(n).
a(n) = A089026(n+1) for n>1.
Also for n>1, a(n) is a numerator of determinant of (n-1) X (n-1) matrix with M(i,j) = (i+2)/(i+1) if i=j, otherwise 1. E.g., a(2) = Numerator[Det[{{3/2}}]] = Numerator[3/2] = 3. a(3) = Numerator[Det[{{3/2,1},{1,4/3}}]] = Numerator[1/1] = 1. a(4) = Numerator[Det[{{3/2,1,1},{1,4/3,1},{1,1,5/4}}]] = Numerator[5/12] = 5. - Alexander Adamchuk, May 26 2006
a(n) = gcd(n*(n+1)/2, n!+1). [Jaume Oliver Lafont, Jan 23 2009]

A120293 Absolute value of numerator of determinant of n X n matrix with M(i,j) = (i+1)/(i+2) if i=j otherwise 1.

Original entry on oeis.org

2, 1, 11, 17, 1, 1, 41, 17, 31, 37, 29, 101, 29, 1, 149, 167, 31, 103, 227, 83, 1, 37, 107, 347, 1, 67, 431, 461, 41, 131, 557, 197, 313, 331, 233, 67, 97, 1, 857, 1, 157, 1, 1031, 359, 281, 293, 1, 1, 661, 229, 1427, 1481, 1, 199, 97, 569, 883, 83, 1, 1949, 503, 173
Offset: 1

Views

Author

Alexander Adamchuk, Jul 08 2006

Keywords

Comments

Some a(n) are equal to 1 (n=2,5,6,14,21,25,38,40,42,47,48,53,59,69,70..). All other a(n) are primes that belong to A038907 (33 is a square mod p).

Crossrefs

Programs

  • Mathematica
    Abs[Numerator[Table[Det[DiagonalMatrix[Table[(i+1)/(i+2)-1,{i,1,n}]]+1],{n,1,70}]]]

Formula

a(n) = Abs[numerator[Det[DiagonalMatrix[Table[(i+1)/(i+2)-1,{i,1,n}]]+1]]].

A166944 a(1)=2; a(n) = a(n-1) + gcd(n, a(n-1)) if n is even, a(n) = a(n-1) + gcd(n-2, a(n-1)) if n is odd.

Original entry on oeis.org

2, 4, 5, 6, 9, 12, 13, 14, 21, 22, 23, 24, 25, 26, 39, 40, 45, 54, 55, 60, 61, 62, 63, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 129, 130, 135, 138, 139, 140, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163
Offset: 1

Views

Author

Vladimir Shevelev, Oct 24 2009

Keywords

Comments

Conjecture: Every record of differences a(n)-a(n-1) more than 5 is the greater of twin primes (A006512).

Crossrefs

Programs

  • Maple
    A166944 := proc(n) option remember; if n = 1 then 2; else p := procname(n-1) ; if type(n,'even') then p+igcd(n,p) ; else p+igcd(n-2,p) ; end if; end if; end proc: # R. J. Mathar, Sep 03 2011
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[OddQ[n],a+GCD[n+1,a],a+GCD[n-1,a]]}; Transpose[ NestList[ nxt,{1,2},70]][[2]] (* Harvey P. Dale, Feb 10 2015 *)
  • PARI
    print1(a=2); for(n=2, 100, d=gcd(a, if(n%2, n-2, n)); print1(", "a+=d)) \\ Charles R Greathouse IV, Oct 13 2017

Extensions

Terms beginning with a(18) corrected by Vladimir Shevelev, Nov 10 2009

A167053 a(1)=3; for n > 1, a(n) = 1 + a(n-1) + gcd( a(n-1)*(a(n-1)+2), A073829(a(n-1)) ).

Original entry on oeis.org

3, 19, 39, 81, 165, 333, 335, 673, 1347, 1349, 1351, 1353, 1355, 1357, 1359, 2721, 2723, 2725, 2727, 5457, 5459, 5461, 5463, 5465, 5467, 5469, 10941, 10943, 10945, 10947, 21897, 21899, 21901, 21903, 21905, 21907, 21909, 43821, 43823, 43825, 43827, 43829, 43831
Offset: 1

Views

Author

Vladimir Shevelev, Oct 27 2009

Keywords

Comments

The first differences are 16, 20, 42, etc. They are either 2 or in A075369 or in A008864, see A167054.
A proof follows from Clement's criterion of twin primes.

Examples

			a(2) = 1 + 3 + gcd(3*5, 4*(2! + 1) + 3) = 19.
		

References

  • E. Trost, Primzahlen, Birkhäuser-Verlag, 1953, pages 30-31.

Crossrefs

Programs

  • Maple
    A073829 := proc(n) n+4*((n-1)!+1) ; end proc:
    A167053 := proc(n) option remember ; local aprev; if n = 1 then 3; else aprev := procname(n-1) ; 1+aprev+gcd(aprev*(aprev+2),A073829(aprev)) ; end if; end proc:
    seq(A167053(n),n=1..60) ; # R. J. Mathar, Dec 17 2009
  • Mathematica
    A073829[n_] := 4((n-1)! + 1) + n;
    a[1] = 3;
    a[n_] := a[n] = 1 + a[n-1] + GCD[a[n-1] (a[n-1] + 2), A073829[a[n-1]]];
    Array[a, 60] (* Jean-François Alcover, Mar 25 2020 *)

Extensions

Definition shortened and values from a(4) on replaced by R. J. Mathar, Dec 17 2009

A167054 Values of A167053(k)-A167053(k-1)-1 not equal to 1.

Original entry on oeis.org

15, 19, 41, 83, 167, 337, 673, 1361, 2729, 5471, 10949, 21911, 43853, 87719, 175447, 350899, 701819, 1403641, 2807303, 5614657, 11229331, 22458671, 44917381, 89834777, 179669557, 359339171, 718678369
Offset: 1

Views

Author

Vladimir Shevelev, Oct 27 2009

Keywords

Comments

All terms of the sequence are primes or products of twin primes (A037074).

Crossrefs

Extensions

Values from a(3) on replaced by R. J. Mathar, Dec 17 2009
More terms from Amiram Eldar, Sep 13 2019

A167170 a(6) = 14, for n >= 7, a(n) = a(n-1) + gcd(n, a(n-1)).

Original entry on oeis.org

14, 21, 22, 23, 24, 25, 26, 39, 40, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 177, 180, 181, 182, 189, 190, 195
Offset: 6

Views

Author

Vladimir Shevelev, Oct 29 2009, Nov 06 2009

Keywords

Comments

For every n >= 7, a(n) - a(n-1) is 1 or prime. This Rowland-like "generator of primes" is different from A106108 (see comment to A167168).

Crossrefs

Programs

  • Maple
    A167170 := proc(n) option remember; if n = 6 then 14; else procname(n-1)+igcd(n,procname(n-1)) ; end if; end proc: seq(A167170(i),i=6..80) ; # R. J. Mathar, Oct 30 2010
  • Mathematica
    RecurrenceTable[{a[n] == a[n - 1] + GCD[n, a[n - 1]], a[6] == 14}, a, {n, 6, 100}] (* G. C. Greubel, Jun 04 2016 *)
    nxt[{n_,a_}]:={n+1,a+GCD[a,n+1]}; NestList[nxt,{6,14},60][[All,2]] (* Harvey P. Dale, Nov 03 2019 *)
  • PARI
    first(n)=my(v=vector(n-5)); v[1]=14; for(k=7,n, v[k-5]=v[k-6]+gcd(k,v[k-6])); v \\ Charles R Greathouse IV, Aug 22 2017

Extensions

Terms > 91 from R. J. Mathar, Oct 30 2010

A167195 a(2)=3, for n>=3, a(n)=a(n-1)+gcd(n, a(n-1)).

Original entry on oeis.org

3, 6, 8, 9, 12, 13, 14, 15, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 92, 93, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116
Offset: 2

Views

Author

Vladimir Shevelev, Oct 30 2009, Nov 06 2009

Keywords

Comments

For every n>=3, a(n)-a(n-1) is 1 or prime. This Rowland-like "generator of primes" is different from A106108 and from generators A167168. Generalization: Let p be a prime. Let N(p-1)=p and for n>=p, N(n)=N(n-1)+gcd(n, N(n-1)). Then, for every n>=p, N(n)-N(n-1) is 1 or prime.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == a[n - 1] + GCD[n, a[n - 1]], a[2] == 3}, a, {n, 2, 100}] (* G. C. Greubel, Jun 05 2016 *)

Formula

a(n) = a(n-1) + 1 if gcd(a(n-1), n) = 1, or a(n) = 2*n otherwise. - Yifan Xie, Aug 20 2025

Extensions

Edited by Charles R Greathouse IV, Nov 02 2009

A167495 Records in A167494.

Original entry on oeis.org

2, 3, 5, 13, 31, 61, 139, 283, 571, 1153, 2311, 4651, 9343, 19141, 38569, 77419, 154873, 310231, 621631, 1243483, 2486971, 4974721
Offset: 1

Views

Author

Vladimir Shevelev, Nov 05 2009

Keywords

Comments

Conjecture: each term > 3 of the sequence is the greater member of a twin prime pair (A006512).
Indices of the records are 1, 2, 4, 6, 9, 10, 15, 18, 21, 25, 28, 30, 38, 72, 90, ... [R. J. Mathar, Nov 05 2009]
One can formulate a similar conjecture without verification of the primality of the terms (see Conjecture 4 in my paper). [Vladimir Shevelev, Nov 13 2009]

Crossrefs

Programs

  • Mathematica
    nxt[{n_, a_}] := {n + 1, If[EvenQ[n], a + GCD[n+1, a], a + GCD[n-1, a]]};
    A167494 = DeleteCases[Differences[Transpose[NestList[nxt, {1, 2}, 10^7]][[2]]], 1];
    Tally[A167494][[All, 1]] //. {a1___, a2_, a3___, a4_, a5___} /; a4 <= a2 :> {a1, a2, a3, a5} (* Jean-François Alcover, Oct 29 2018, using Harvey P. Dale's code for A167494 *)

Extensions

Simplified the definition to include all records; one term added by R. J. Mathar, Nov 05 2009
a(16) to a(21) from R. J. Mathar, Nov 19 2009
a(22) from Jean-François Alcover, Oct 29 2018
Showing 1-10 of 17 results. Next