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 11-17 of 17 results.

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

Original entry on oeis.org

7, 14, 16, 17, 18, 19, 20, 21, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 116, 117, 120, 121, 122, 123, 124, 125, 126, 127, 128
Offset: 6

Views

Author

Vladimir Shevelev, Oct 30 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) and from A167170. Note that, lim sup a(n) / n = 2, while lim sup A106108(n) / n = lim sup A167170(n) / n = 3.
Going up to a million, differences of two consecutive terms of this sequence gives primes about 0.009% of the time. The rest are 1's. [Alonso del Arte, Nov 30 2009]

Crossrefs

Programs

  • Maple
    A[6]:= 7:
    for n from 7 to 100 do A[n]:= A[n-1] + igcd(n,A[n-1]) od:
    seq(A[i],i=6..100); # Robert Israel, Jun 05 2016
  • Mathematica
    a[6] = 7; a[n_ /; n > 6] := a[n] = a[n - 1] + GCD[n, a[n - 1]]; Table[a[n], {n, 6, 58}]
  • Python
    from math import gcd
    def aupton(nn):
        alst = [7]
        for n in range(7, nn+1): alst.append(alst[-1] + gcd(n, alst[-1]))
        return alst
    print(aupton(68)) # Michael S. Branicky, Jul 14 2021

Extensions

Verified and edited by Alonso del Arte, Nov 30 2009

A120292 Absolute value of numerator of determinant of n X n matrix with elements M[i,j] = prime(i)/(1+prime(i)) if i=j and 1 otherwise.

Original entry on oeis.org

2, 1, 1, 5, 1, 23, 1, 1, 1, 23, 17, 13, 5, 1, 1, 1, 1, 37, 293, 47, 61, 29, 1, 29, 271, 593, 43, 233, 29, 811, 1, 941, 101, 1, 1, 1231, 131, 29, 1, 521, 1, 109, 1, 149, 509, 89, 59, 107, 617, 1, 1, 47, 173, 3067, 47, 1, 3463, 3599, 89, 431, 4021, 521, 2161, 2239, 103, 1, 1
Offset: 1

Views

Author

Alexander Adamchuk, Jul 08 2006, Jul 04 2008

Keywords

Comments

Some a(n) are equal to 1 (n = 2, 3, 5, 7, 8, 9, 14, 15, 16, 17, 23, 31, 34, 35, 39, 41, 43, 50, 51, 56, ...).
a(58) = 3599 = 59*61 is not prime. - T. D. Noe, Nov 15 2006
Most terms are prime or 1.
Numbers n such that a(n)>1 and is not prime are listed in A141779(n) = {58, 282, 367, 743, 808, 1015, 1141, 1299, 1962, 2109, 2179, 2397, 2501, ...}.
Composite terms are listed in A141781 = {3599, 118477, 210589, 971573, 1164103, 1901959, 2446681, 3230069, ...}.
Note that all listed terms of A141781 are semiprime, for example: 3599 = 59*61, 118477 = 257*461, 210589 = 251*839, 971573 = 643*1511.
Conjecture: All composite terms are semiprime.

Crossrefs

Programs

  • Mathematica
    Abs[Numerator[Table[Det[DiagonalMatrix[Table[Prime[i]/(Prime[i]+1)-1,{i,1,n}]]+1],{n,1,60}]]]
    Table[Numerator[Abs[(1 - Sum[Prime[k] + 1,{k, 1, n}])/Product[Prime[k] + 1, {k, 1, n}] ]],{n,1,282}]
  • PARI
    a(n)=abs(numerator(matdet(matrix(n,n,i,j,if(i==j,prime(i)/(1+prime(i)),1))))) \\ Charles R Greathouse IV, Feb 07 2013

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

Original entry on oeis.org

2, 4, 5, 6, 7, 8, 9, 12, 15, 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 52, 53, 54, 55, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 124, 125, 126
Offset: 1

Views

Author

Vladimir Shevelev, Nov 05 2009

Keywords

Comments

Conjectures. 1) For n >= 2, every difference a(n) - a(n-1) is 1 or prime; 2) Every record of differences a(n) - a(n-1) greater than 3 belongs to the sequence of the greater of twin primes (A006512).
Conjecture #1 above fails at n = 620757, with a(n) = 1241487 and a(n-1) = 1241460, difference = 27. Additionally, the terms of related A167495(m) quickly tend to index n/2. So for example, A167495(14) = 19141 is seen at n = 38284. - Bill McEachen, Jan 20 2023
It seems that, for n > 4, (3*n-3)/2 <= a(n) <= 2n - 3. Can anyone find a proof or disproof? - Charles R Greathouse IV, Jan 22 2023

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[EvenQ[n],a+GCD[n+1,a],a+GCD[n-1,a]]}; Transpose[ NestList[nxt,{1,2},70]][[2]] (* Harvey P. Dale, Dec 05 2015 *)
  • PARI
    lista(nn)=my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = if (n%2, va[n-1] + gcd(n, va[n-1]), va[n-1] + gcd(n-2, va[n-1]));); va; \\ Michel Marcus, Dec 13 2018
    
  • Python
    from math import gcd
    from itertools import count, islice
    def agen(): # generator of terms
        an = 2
        for n in count(2):
            yield an
            an = an + gcd(n, an) if n&1 else an + gcd(n-2, an)
    print(list(islice(agen(), 66))) # Michael S. Branicky, Jan 22 2023

Formula

For n > 3, n < a(n) < n*(n-1)/2. - Charles R Greathouse IV, Jan 22 2023

Extensions

More terms from Harvey P. Dale, Dec 05 2015

A167494 List of first differences of A167493 that are different from 1.

Original entry on oeis.org

2, 3, 3, 5, 3, 13, 5, 3, 31, 61, 7, 5, 3, 7, 139, 5, 3, 283, 5, 3, 571, 7, 5, 3, 1153, 5, 3, 2311, 31, 4651, 17, 5, 13, 3, 3, 5, 3, 9343, 5, 3, 11, 3, 59, 3, 29, 3, 19, 7, 5, 3, 7, 19, 5, 3, 17, 3, 113
Offset: 1

Views

Author

Vladimir Shevelev, Nov 05 2009

Keywords

Comments

Conjecture. All terms of the sequence are primes.
The conjecture is false: a(144)=27, a(146)=25, a(158)=45, etc., which are composite numbers. - Harvey P. Dale, Dec 05 2015

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,If[EvenQ[n],a+GCD[n+1,a],a+GCD[n-1,a]]}; DeleteCases[ Differences[ Transpose[NestList[nxt,{1,2},20000]][[2]]],1] (* Harvey P. Dale, Dec 05 2015 *)
  • PARI
    lista(nn) = {my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = if (n%2, va[n-1] + gcd(n, va[n-1]), va[n-1] + gcd(n-2, va[n-1]));); select(x->(x!=1), vector(nn-1, n, va[n+1] - va[n]));} \\ Michel Marcus, Dec 13 2018

A127853 Numbers n such that A118680(n) = 1.

Original entry on oeis.org

10, 17, 26, 36, 37, 45, 50, 59, 61, 65, 67, 78, 82, 90, 91, 94, 101, 102, 105, 108, 110, 122, 136, 138, 145, 147, 149, 153, 155, 165, 170, 173, 181, 183, 188, 189, 193, 197, 210, 213, 220, 224, 226, 231, 232, 239, 249, 250, 257, 262, 263, 266, 268, 276, 279
Offset: 1

Views

Author

Alexander Adamchuk, Feb 03 2007

Keywords

Comments

Also a(n) are the numbers n such that 1 + Sum[ k, {k,1,n} ] = 1 + n(n+1)/2 divides Product[ k, {k,1,n} ] = n!. A118680[ a(n) ] = 1, where A118680(n) = {2, 2, 7, 11, 2, 11, 29, 37, 23, 1, 67, 79, 23, 53, 11, 137, 1, ...} = Absolute value of numerator of determinant of n X n matrix with M(i,j) = (i+1)/i if i=j otherwise 1. A118680(n) = Numerator[ (1 + n(n+1)/2) / n! ].

Crossrefs

Programs

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

A168143 a(17)=37; for n>=17, a(n)=3n-14 if gcd(n,a(n-1))>1 and all prime divisors of n more than 17; a(n)=a(n-1)+1, otherwise.

Original entry on oeis.org

37, 38, 43, 44, 45, 46, 55, 56, 57, 58, 59, 60, 61, 62, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157
Offset: 17

Views

Author

Vladimir Shevelev, Nov 19 2009

Keywords

Comments

a(n+1)-a(n)+14 is either 15 or a prime > 17. For a generalization, see the second Shevelev link. - Edited by Robert Israel, Aug 21 2017

Crossrefs

Programs

  • Maple
    A[17]:= 37:
    q:= convert(select(isprime,[$2..17]),`*`);
    for n from 18 to 100 do
      if igcd(n,A[n-1]) > 1 and igcd(n,q) = 1 then A[n]:= 3*n-14
        else A[n]:= A[n-1]+1 fi
    od:
    seq(A[i],i=17..100); # Robert Israel, Aug 21 2017
  • Mathematica
    nxt[{n_,a_}]:={n+1,If[GCD[n+1,a]>1&&FactorInteger[n+1][[1,1]]>17,3(n+1)-14,a+1]}; NestList[nxt,{17,37},60][[All,2]] (* Harvey P. Dale, Aug 15 2017 *)

Extensions

Corrected by Harvey P. Dale, Aug 15 2017

A168144 First differences of A168143 which are different from 1, incremented by 14.

Original entry on oeis.org

19, 23, 31, 47, 79
Offset: 1

Views

Author

Vladimir Shevelev, Nov 19 2009

Keywords

Comments

All terms of the sequence are primes greater than 17.
Are there more than 5 terms?

Crossrefs

Programs

Extensions

Corrected and edited by Eric Rowland, Jan 27 2019
Previous Showing 11-17 of 17 results.