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 10 results.

A056650 a(n) is the greatest prime factor of a(n-1)^2+a(n-1)+1.

Original entry on oeis.org

2, 7, 19, 127, 5419, 1009, 9181, 1423, 96493, 163350799, 25249969, 212520319916977, 784949209969, 145542538757017, 147660435988297, 2508855873622663, 3565137918692593, 6521735641, 11273204227, 16141059763, 125679599753438821, 240780337980146570229319, 7282590063606707136764017
Offset: 0

Views

Author

Henry Bottomley, Aug 09 2000

Keywords

Comments

Except for the first term the initial (ten at least) terms are one more than a multiple of 6, with the result that a(n)^2+a(n)+1 is in these cases an odd multiple of 3 and appears to be 3 times the product of primes all of which are one more than a multiple of 6.

Crossrefs

Extensions

More terms from Vladeta Jovovic, Nov 26 2001

A235473 Primes whose base-3 representation is also the base-4 representation of a prime.

Original entry on oeis.org

2, 43, 61, 67, 97, 103, 127, 139, 151, 157, 199, 211, 229, 277, 283, 331, 337, 349, 373, 379, 433, 439, 463, 499, 523, 571, 601, 607, 727, 751, 787, 823, 853, 883, 919, 991, 1063, 1087, 1117, 1213, 1249, 1327, 1381, 1429, 1483, 1531, 1567, 1597, 1627, 1759, 1783, 1867, 1999
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
This is a subsequence of A045331 and A045375.

Examples

			43 = 1121_3 and 1121_4 = 89 are both prime, so 43 is a term.
		

Crossrefs

Cf. A235266, A235474, A152079, A235475 - A235479, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[FromDigits[IntegerDigits[#,3],4]]&] (* Harvey P. Dale, Oct 16 2015 *)
  • PARI
    is(p,b=4,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b > c.

A260488 Numbers of the form 2^m * (6k + 1) for m, k >= 0, and 0.

Original entry on oeis.org

0, 1, 2, 4, 7, 8, 13, 14, 16, 19, 25, 26, 28, 31, 32, 37, 38, 43, 49, 50, 52, 55, 56, 61, 62, 64, 67, 73, 74, 76, 79, 85, 86, 91, 97, 98, 100, 103, 104, 109, 110, 112, 115, 121, 122, 124, 127, 128, 133, 134, 139, 145, 146, 148, 151, 152, 157
Offset: 0

Views

Author

Keywords

Comments

Alternate definition: starting with a(0) = 0, include 2n if n is in the sequence, and include 2n+1 if no two previous terms sum to 2n+1.
It suffices to prove this for odd n. If n == 3(6), n-2 == 1 (mod 6); if n == 5 (mod 6), n-4 == 1 (mod 6). However, if n == 1 (mod 6), any even k in the sequence, 0 < k < n, will have k !== 0 (mod 3), and so n-k != 1 (mod 3), so it is not in the sequence; thus n must be.
Every nonnegative integer is the sum of two members of this sequence; every positive integer is the sum of two distinct members of this sequence. For odd n, this is by the construction in the alternate definition; and for even n, by induction n/2 = i + j, and so n = 2i + 2j.
It follows that:
* No member of this sequence except 0 is a multiple of 3.
* The sequence has a density of 1/3.
* The difference between consecutive terms is always one of {1, 2, 3, 5, 6}, and each of these occurs infinitely often, with 1 having density 1/3 and the others having density 1/6.
* The sequence is closed under multiplication.
* The primes in the sequence are A045375.

Examples

			Using the alternate definition:
1 is in the sequence because it is not the sum of 2 elements from {0}.
2 is in the sequence because 2 = 2*1, and 1 is in the sequence.
3 is not in the sequence because 3 = 1 + 2, and 1 and 2 are in the sequence.
6 is not in the sequence because 6 = 2*3, and 3 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    sort([0, seq(seq(2^m*(6*k+1), k = 0 .. floor((N/2^m - 1)/6)), m = 0 .. ilog2(N))]);  # Robert Israel, Aug 25 2015
  • Mathematica
    mx=160;Join[{0},Sort@Flatten@Table[2^m*(6k+1),{m,0,Log2[mx]},{k,0,mx/(6*2^m)}]] (* Robert G. Wilson v, Aug 16 2015 *)
  • PARI
    alist(n) = my(r=vector(n),j,k);r[1]=0;j=1;while(j
    				
  • PARI
    alim(n)={my(p=1,p2=p,r,j);
      for(k=1,n,
        if(if(k%2==0, polcoeff(p,k\2),polcoeff(p2,k)==0),p+=x^k;p2+=x^k*p));
      r=vector(subst(p,x,1));for(k=0,n,if(polcoeff(p,k),r[j++]=k));r}

Formula

n is in the sequence if and only if n = 0 or A000265(n) == 1 (mod 6). [Clarified by Peter Munn, Jun 11 2021]
n is in the sequence if n = 0 or b(n) is nonzero where b = A113448, A115235, or A123863. - Michael Somos, Jul 29 2015

A164979 Slowest growing sequence of primes having the semiprime-pairwise property: for any i,j, a(i)+a(j) is semiprime.

Original entry on oeis.org

2, 7, 19, 67, 127, 6619, 126127, 345979, 476407, 1658119, 15182459419, 105169832587, 287583971287
Offset: 1

Views

Author

Zak Seidov, Sep 03 2009

Keywords

Comments

By Dirichlet's theorem and Linnik's theorem, a(n) exists for all n. - Charles R Greathouse IV, Jun 03 2025

Crossrefs

Subsequence of A045375.

Programs

  • PARI
    lista(pmax) = {my(v = [2], ans); print1(v[1], ", "); forprime(p=3, pmax, ans = 1; for(i=1, #v, if(bigomega(p + v[i]) != 2, ans = 0; break)); if(ans, print1(p, ", "); v=concat(v, p)));} \\ Amiram Eldar, Jun 27 2024

Formula

a(n) = A114845(n)/2.
a(n) << A070826(n)^5. - Charles R Greathouse IV, Jun 03 2025

Extensions

a(12) from Amiram Eldar, Jun 27 2024
a(13) from Jinyuan Wang, May 29 2025

A171715 Absolute value of (n-th prime of form 3*m-1 minus n-th prime of form 3*k+1/2+-1/2).

Original entry on oeis.org

1, 2, 2, 2, 8, 8, 2, 14, 14, 14, 8, 14, 14, 8, 20, 26, 20, 20, 14, 14, 20, 20, 20, 26, 2, 8, 32, 26, 26, 44, 44, 50, 44, 38, 50, 26, 26, 38, 26, 32, 32, 20, 26, 20, 38, 38, 56, 62, 56, 68, 68, 80, 50, 50, 50, 44, 50, 62, 56, 50, 62, 74, 74, 62, 68, 56, 50, 44, 50, 50, 32, 44, 38
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 17 2009, Feb 09 02 2010

Keywords

Comments

Also, the absolute value of (n-th generalized cuban prime minus n-th generalized non-cuban prime).
Or, the absolute value of n-th prime of form 6*m-3/2+-5/2 minus n-th prime of form 6*k-2+-1.

Examples

			a(1) = abs(3*1-1-(3*1+1/2-1/2)) = 1; a(2) = abs(3*2-1-(3*2+1/2+1/2)) = 2.
		

Crossrefs

Programs

  • Maple
    A003627 := proc(n) if n <= 2 then op(n,[2,5]) ; ; else for a from procname(n-1)+2 by 2 do if isprime(a) and (a mod 3) =2 then return a ; end if; end do: end if; end proc:
    A007645 := proc(n) if n <= 2 then op(n,[3,7]) ; ; else for a from procname(n-1)+2 by 2 do if isprime(a) and (a mod 3) <> 2 then return a ; end if; end do: end if; end proc:
    A171715 := proc(n) abs(A003627(n)-A007645(n)) ; end proc: # R. J. Mathar, Apr 24 2010
  • Mathematica
    Module[{nn=500,p1,p2,len},p1=Select[3*Range[nn]-1,PrimeQ];p2=Select[Flatten[#+{0,1}&/@ (3*Range[nn])],PrimeQ];len=Min[Length[p1],Length[p2]]; Abs[#[[1]]-#[[2]]]&/@ Thread[ {Take[p1,len],Take[p2,len]}]] (* Harvey P. Dale, Aug 29 2023 *)

Formula

a(n) = abs(A003627(n)-A007645(n)) = abs(A045375(n)-A045410(n)).

Extensions

Entries checked by R. J. Mathar, Apr 24 2010

A172182 Nonprimes of the form 6k + 1 or 6k + 2.

Original entry on oeis.org

1, 8, 14, 20, 25, 26, 32, 38, 44, 49, 50, 55, 56, 62, 68, 74, 80, 85, 86, 91, 92, 98, 104, 110, 115, 116, 121, 122, 128, 133, 134, 140, 145, 146, 152, 158, 164, 169, 170, 175, 176, 182, 187, 188, 194, 200, 205, 206, 212, 217, 218, 224, 230, 235, 236, 242, 247
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 28 2010

Keywords

Crossrefs

Cf. A045375.

Programs

Formula

a(n) ~ 3n. - Charles R Greathouse IV, May 25 2011

Extensions

Entries checked by R. J. Mathar, May 22 2010
Retitled by Charles R Greathouse IV, May 25 2011

A231476 Primes whose base-3 representation is also the base-6 representation of a prime.

Original entry on oeis.org

2, 7, 13, 19, 31, 151, 163, 211, 223, 229, 241, 271, 349, 367, 439, 601, 607, 613, 631, 643, 673, 727, 733, 859, 907, 937, 997, 1021, 1033, 1039, 1051, 1093, 1117, 1123, 1129, 1153, 1321, 1327, 1399, 1423, 1429, 1609, 1627, 1657, 1669, 1741, 1747, 1759, 1777, 1789, 1831, 1867, 1933, 1951, 1993, 1999
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
Subsequence of A045375A045331.

Examples

			7 = 21_3 and 21_6 = 13 are both prime.
		

Crossrefs

Cf. A235469, A235265, A235266, A235473, A152079, A235461 - A235482, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[FromDigits[ IntegerDigits[#, 3], 6]] &] (* Harvey P. Dale, Sep 29 2016 *)
  • PARI
    is(p,b=6,c=3)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: This code is only valid for b>c.

A279815 Numbers n such that the average of the squares of the numbers less than n that do not divide n is an integer.

Original entry on oeis.org

3, 4, 7, 13, 16, 19, 20, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 188, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613, 619, 631, 643, 661, 673, 691, 709, 727, 733, 739, 751, 757, 769, 787
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 19 2016

Keywords

Comments

Numbers n such that A049820(n) divides A276984(n).

Examples

			7 is in the sequence because 7 has 2 divisors {1,7} therefore 5 non-divisors {2,3,4,5,6}, 2^2 + 3^2 + 4^2 + 5^2 + 6^2 = 90 and 5 divides 90.
		

Crossrefs

Superset of A045375(m) (m > 1) ?

Programs

  • Mathematica
    Select[Range[800], Mod[#1 (#1 + 1) ((2 #1 + 1)/6) - DivisorSigma[2, #1], #1 - DivisorSigma[0, #1]] == 0 & ]
  • PARI
    is(n)=my(f=factor(n)); n>2 && ((2*n^3+3*n^2+n)/6-sigma(f,2))%(n-numdiv(f))==0 \\ Charles R Greathouse IV, Dec 19 2016

A172181 Odd composites not of the form 6k + 1.

Original entry on oeis.org

9, 15, 21, 27, 33, 35, 39, 45, 51, 57, 63, 65, 69, 75, 77, 81, 87, 93, 95, 99, 105, 111, 117, 119, 123, 125, 129, 135, 141, 143, 147, 153, 155, 159, 161, 165, 171, 177, 183, 185, 189, 195, 201, 203, 207, 209, 213, 215, 219, 221, 225, 231, 237, 243, 245, 249, 255
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 28 2010

Keywords

Crossrefs

Cf. A005408, A045375, A045410. Odd complement is A091300.

Programs

  • Mathematica
    Union[6Range[42] + 3, Select[6Range[43] - 1, Not[PrimeQ[#]] &]] (* Alonso del Arte, Jun 05 2011 *)
  • PARI
    select(n->(n%6==3 && n>3) || (n%6==5 && !isprime(n)), vector(1000,i,i)) \\ Charles R Greathouse IV, Jun 05 2011

Extensions

Entries checked by R. J. Mathar, May 19 2010

A372763 Denominator of the continued fraction 1/(2-3/(3-4/(4-5/(...(n-1)-n/(n+5))))).

Original entry on oeis.org

13, 19, 5, 31, 37, 43, 7, 11, 61, 67, 73, 79, 17, 1, 97, 103, 109, 23, 11, 127, 1, 139, 29, 151, 157, 163, 1, 1, 181, 1, 193, 199, 41, 211, 1, 223, 229, 47, 241, 1, 1, 1, 53, 271, 277, 283, 1, 59, 1, 307, 313, 1, 1, 331, 337, 1, 349, 71, 1, 367, 373, 379, 1, 1, 397, 1, 409, 83, 421
Offset: 3

Views

Author

Mohammed Bouras, May 12 2024

Keywords

Comments

Conjecture 1: The sequence contains only 1's and the primes.
Conjecture 2: Except for 2 and 3, all primes appear in the sequence once.
Conjecture: Record values correspond to A045375(m), m > 2. - Bill McEachen, Aug 03 2024

Examples

			For n=3, 1/(2 - 3/(3 + 5)) = 8/13, so a(3)=13.
For n=4, 1/(2 - 3/(3 - 4/(4 + 5))) = 23/19, so a(4)=19.
For n=5, 1/(2 - 3/(3 - 4/(4 - 5/(5 + 5)))) = 13/5, so a(5)=5.
For n=6, 1/(2 - 3/(3 - 4/(4 - 5/(5 - 6/(6 + 5))))) = 227/31, so a(6)=31.
		

Crossrefs

Formula

a(n) = (6n - 5)/gcd(6n - 5, A051403(n-2) + 5*A051403(n-3)).
Showing 1-10 of 10 results.