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.

A306097 Terms of A121707 not in A267999.

Original entry on oeis.org

697, 1241, 1247, 1271, 1513, 2057, 2201, 2329, 2501, 2873, 3053, 3131, 3683, 3689, 3961, 4015, 4061, 4141, 4777, 4859, 4991, 5321, 5921, 5963, 6137, 6851, 6953, 7421, 7769, 7781, 7957, 8471, 8711, 8857, 9017, 9211, 9271, 9401, 9641, 9673, 10217, 10277, 10489, 10795, 11033, 11501
Offset: 1

Views

Author

M. F. Hasler, following remarks from Tomasz Ordowski, Oct 03 2018

Keywords

Comments

Numbers n such that gcd(n, 2^n-2) > 1 and gcd(n, b^n-b) = 1 for some b > 2, b < n.
Or: Numbers n such that gcd(n, 2^n-2) > 1 and for every prime factor p of n, p-1 does not divide n-1.
2057 is the first term not in A008367, nor in A287391. - M. F. Hasler, Oct 04 2018

Examples

			The smallest element of this sequence is a(1) = 697 = 17*41.
		

Crossrefs

Programs

  • PARI
    is(n,p)={for(i=1, #p=factor(n)[,1], (n-1)%(p[i]-1)||return); gcd(n, lift(Mod(2,n)^n-2))>1}

Formula

A321488 Nonsemiprimes in A306097 = A121707 \ A267999.

Original entry on oeis.org

2057, 2873, 3689, 4015, 4991, 6137, 6851, 9401, 10795, 11033, 11501, 11837, 11849, 12341, 12593, 13481, 13795, 14297, 15113, 15695, 17155, 17633, 18011, 18377, 18469, 18941, 19097, 20009, 21463, 21641, 22661, 22919, 23273, 24089, 24521, 25721, 25993, 26381
Offset: 1

Views

Author

M. F. Hasler, Nov 11 2018

Keywords

Comments

Equivalently, terms of A321487 not in A267999, or intersection of A321487 and A306097.

Crossrefs

A121707 Numbers n > 1 such that n^3 divides Sum_{k=1..n-1} k^n = A121706(n).

Original entry on oeis.org

35, 55, 77, 95, 115, 119, 143, 155, 161, 187, 203, 209, 215, 221, 235, 247, 253, 275, 287, 295, 299, 319, 323, 329, 335, 355, 371, 377, 391, 395, 403, 407, 413, 415, 437, 455, 473, 475, 493, 497, 515, 517, 527, 533, 535, 539, 551, 559, 575, 581, 583, 589, 611
Offset: 1

Views

Author

Alexander Adamchuk, Aug 16 2006

Keywords

Comments

All terms belong to A038509 (Composite numbers with smallest prime factor >= 5). Many but not all terms belong to A060976 (Odd nonprimes, c, which divide Bernoulli(2*c)).
Many terms are semiprimes:
- the non-semiprimes are {275, 455, 475, 539, 575, 715, 775, 875, 935, ...}: see A321487;
- semiprime terms that are multiples of 5 have indices {7, 11, 19, 23, 31, 43, 47, 59, 67, 71, 79, 83, ...} = A002145 (Primes of form 4*k + 3, except 3, or k > 0; or Primes which are also Gaussian primes);
- semiprime terms that are multiples of 7 have indices {5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, ...} = A003627 (Primes of form 3*k - 1, except 2, or k > 1);
- semiprime terms that are multiples of 11 have indices {5, 7, 13, 17, 19, 23, 37, 43, 47, 53, 59, 67, 73, 79, 83, ...} = Primes of the form 4*k + 1 and 4*k - 1. [Edited by Michel Marcus, Jul 21 2018, M. F. Hasler, Nov 09 2018]
Conjecture: odd numbers n > 1 such that n divides Sum_{k=1..n-1} k^(n-1). - Thomas Ordowski and Robert Israel, Oct 09 2015. Professor Andrzej Schinzel (in a letter to me, dated Dec 29 2015) proved this conjecture. - Thomas Ordowski, Jul 20 2018
Note that n^2 divides Sum_{k=1..n-1} k^n for every odd number n > 1. - Thomas Ordowski, Oct 30 2015
Conjecture: these are "anti-Carmichael numbers" defined; n > 1 such that p - 1 does not divide n - 1 for every prime p dividing n. Equivalently, odd numbers n > 1 such that n is coprime to A027642(n-1). A number n > 1 is an "anti-Carmichael" if and only if gcd(n, b^n - b) = 1 for some integer b. - Thomas Ordowski, Jul 20 2018
It seems that these numbers are all composite terms of A317358. - Thomas Ordowski, Jul 30 2018
a(62) = 697 is the first term not in A267999: see A306097 for all these terms. - M. F. Hasler, Nov 09 2018
If the conjecture from Thomas Ordowski is true, then no term is a multiple of 2 or 3. - Jianing Song, Jan 27 2019
Conjecture: an odd number n > 1 is a term iff gcd(n, A027642(n-1)) = 1. - Thomas Ordowski, Jul 19 2019
Conjecture: Sequence consists of numbers n > 1 such that r = b^n + n - b will produce a prime for one or more integers b > 1. Only when n is in this sequence do one or more prime factors of n fail to divide r for all b. Also, n and b must be coprime for r to be prime. The above also applies to r = b^n - n - b, ignoring n=3, b=2. - Richard R. Forberg, Jul 18 2020
Odd numbers n > 1 such that Sum_{k(even)=2..n-1}2*k^(n-1) == 0 (mod n). - Davide Rotondo, Oct 28 2020
What is the asymptotic density of these numbers? The numbers A267999 have a slightly lower density. The difference between the densities is equal to the density of the numbers A306097. - Thomas Ordowski, Feb 15 2021
The asymptotic density of this sequence is in the interval (0.253, 0.265) (Ordowski, 2021). - Amiram Eldar, Feb 26 2021

Crossrefs

Cf. A000312, A002145, A002997, A027642, A031971, A038509, A060976, A121706, A267999 (probably a subsequence).
Cf. A306097 for terms of this sequence A121707 not in sequence A267999, A321487 for terms which are not semiprimes.
Cf. A191677 (n divides Sum_{k
Cf. A326478 for a conjectured connection with the Bernoulli numbers.

Programs

  • Maple
    filter:= n -> add(k &^ n mod n^3, k=1..n-1) mod n^3 = 0:
    select(filter, [$2..1000]); # Robert Israel, Oct 08 2015
  • Mathematica
    fQ[n_] := Mod[Sum[PowerMod[k, n, n^3], {k, n - 1}], n^3] == 0; Select[
    Range[2, 611], fQ] (* Robert G. Wilson v, Apr 04 2011 and slightly modified Aug 02 2018 *)
  • PARI
    is(n)=my(n3=n^3);sum(k=1,n-1,Mod(k,n3)^n)==0 \\ Charles R Greathouse IV, May 09 2013
    
  • PARI
    for(n=2, 1000, if(sum(k=1, n-1, k^n) % n^3 == 0, print1(n", "))) \\ Altug Alkan, Oct 15 2015
    
  • Sage
    # after Andrzej Schinzel
    def isA121707(n):
        if n == 1 or is_even(n): return False
        return n.divides(sum(k^(n-1) for k in (1..n-1)))
    [n for n in (1..611) if isA121707(n)] # Peter Luschny, Jul 18 2019

Extensions

Sequence corrected by Robert G. Wilson v, Apr 04 2011

A108574 Range of A000790 (primary pretenders).

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 38, 39, 46, 49, 51, 57, 58, 62, 65, 69, 74, 82, 85, 86, 87, 91, 93, 94, 106, 111, 118, 121, 122, 123, 129, 133, 134, 141, 142, 145, 146, 158, 159, 166, 169, 177, 178, 183, 185, 194, 201, 202, 205, 206, 213, 214, 217, 218, 219, 226, 237, 249, 254, 259, 262, 265, 267, 274, 278, 289, 291, 298, 301, 302, 303, 305, 309, 314, 321, 326, 327, 334, 339, 341, 346, 358, 361, 362, 365, 381, 382, 386, 393, 394, 398, 411, 417, 422, 427, 445, 446, 447, 451, 453, 454, 458, 466, 469, 471, 478, 481, 482, 485, 489, 501, 502, 505, 511, 514, 519, 526, 529, 537, 538, 542, 543, 545, 553, 554, 561
Offset: 1

Author

David W. Wilson, Jun 10 2005

Keywords

Comments

All terms except for the last term, 561, are semiprimes (A001358). Semiprimes up to 559 that are not here: 35, 55, 77, 95, 115, 119, 143, 155, 161, 187, 203, 209, 215, 221, 235, 247, 253, 287, 295, 299, 319, 323, 329, 335, 355, 371, 377, 391, 395, 403, 407, 413, 415, 437, 473, 493, 497, 515, 517, 527, 533, 535, 551, 559. - Zak Seidov, Jan 08 2015
The LCM of all terms is 23# * 277# (where # denotes the primorial function A034386), the period of A000790, and therefore also of the related sequence b(n) = gcd(A000790(n), n). - M. F. Hasler, Feb 16 2018
Range of A295997. - Thomas Ordowski, Feb 27 2018
These numbers k < 561 are semiprimes k = pq such that p-1 | q-1, where primes p <= q. Equivalent condition is p-1 | k-1. - Thomas Ordowski, Aug 18 2018
This shows that all even semiprimes < 561 are in this sequence. The odd semiprimes not in this sequence are the semiprimes (equivalently: all terms but 275, 455, 475, 539) less than 561 in A267999 (which equals A121707 up to 695). - M. F. Hasler, Nov 09 2018

Crossrefs

Programs

  • Mathematica
    pp[n_] := For[c = 4, True, c = If[PrimeQ[c+1], c+2, c+1], If[PowerMod[n, c, c] == Mod[n, c], Return[c]]];seq[n_] := seq[n] = Table[pp[k], {k, 0, 2^n}] // Union; seq[10]; seq[n = 11]; While[ Print["n = ", n, " more terms: ", Complement[seq[n], seq[n-1]]]; seq[n] != seq[n-1], n++]; A108574 = seq[n] (* Jean-François Alcover, Oct 18 2013 *)
  • PARI
    my(A=List(561)); forprime(q=2,561\2, forprime(p=2,min(q,561\q), (q-1)%(p-1)|| listput(A, p*q))); A108574=Set(A) \\ M. F. Hasler, Nov 09 2018

A321487 Numbers in A121707 (n^3 > 1 divides Sum_{k=1..n-1} k^n) which are not semiprimes.

Original entry on oeis.org

275, 455, 475, 539, 575, 715, 775, 875, 935, 1075, 1127, 1175, 1235, 1295, 1375, 1421, 1463, 1475, 1495, 1547, 1595, 1615, 1675, 1715, 1775, 1859, 1955, 1975, 2009, 2015, 2035, 2057, 2075, 2093, 2135, 2255, 2261, 2299, 2303, 2375, 2387, 2555, 2575, 2597, 2635, 2639, 2675, 2717, 2783
Offset: 1

Author

M. F. Hasler, Nov 11 2018

Keywords

Comments

Most terms of A121707 and its (conjectured) subsequence A267999 are semiprimes. This sequence lists the exceptions.
At first, it looked as if most terms were multiples of 5. The first exceptions are a({4, 11, 16}) = {539, 1127, 1421}. However, after the first 30 terms, almost every other term is not divisible by 5.
The first terms not in A267999 are {2057, 2873, 3689, 4015, 4991, 6137, ...}, cf. A321488.

Crossrefs

A214606 a(n) = gcd(n, 2^n - 2).

Original entry on oeis.org

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

Author

Alex Ratushnyak, Jul 22 2012

Keywords

Comments

Greatest common divisor of n and 2^n - 2.
a(n)=n iff n=1 or n is prime or n is Fermat pseudoprime to base 2 or even pseudoprime to base 2. - Corrected by Thomas Ordowski, Jan 25 2016
Indices of 1's: A121707 preceded by 1. - False, see A267999.
Numbers n such that a(n) does not equal A020639(n) (the least prime factor of n): A146077.

Examples

			a(3) = 3 because 2^3 - 2 = 6 and gcd(3, 6) = 3.
a(4) = 2 because 2^4 - 2 = 14 and gcd(4, 14) = 2.
		

Crossrefs

Programs

  • Java
    import java.math.BigInteger;
    public class A214606 {
      public static void main (String[] args) {
        BigInteger c1 = BigInteger.valueOf(1);
        BigInteger c2 = BigInteger.valueOf(2);
        for (int n=0; n<222; n++) {
          BigInteger bn=BigInteger.valueOf(n),pm2=c1.shiftLeft(n).subtract(c2);
          System.out.printf("%s, ", bn.gcd(pm2).toString());
        }
      }
    }
    
  • Magma
    [GCD(n, 2^n-2): n in [1..80]]; // Vincenzo Librandi, Jan 26 2016
  • Maple
    seq(igcd(n, (2&^n - 2) mod n), n=1 .. 1000); # Robert Israel, Jan 26 2016
  • Mathematica
    Table[GCD[n, 2^n - 2], {n, 1, 59}] (* Alonso del Arte, Jul 22 2012 *)
  • PARI
    a(n)=gcd(n,lift(Mod(2,n)^n-2)) \\ Charles R Greathouse IV, May 29 2014
    

A316111 a(n) is the smallest k > 1 such that gcd(k, n^k - n) = 1, for n > 1.

Original entry on oeis.org

35, 35, 77, 77, 143, 55, 55, 77, 119, 119, 35, 55, 187, 143, 77, 35, 35, 77, 143, 247, 95, 35, 77, 77, 77, 55, 55, 143, 77, 77, 35, 35, 247, 143, 143, 35, 35, 77, 77, 143, 55, 95, 119, 119, 77, 35, 55, 143, 143, 77, 35, 35, 119, 299, 221, 55, 35, 77, 77, 77, 55, 55, 187, 119
Offset: 2

Author

Thomas Ordowski, Aug 13 2018

Keywords

Comments

Conjecture: all the terms are in A121707. If k is a term, then k is an "anti-Carmichael number": p-1 does not divide k-1 for every prime p dividing k.
The sequence is unbounded, since a(m!) > m.
Prediction: a(n) < n for all sufficiently large n.
GCD(n, a(n)) = 1. a(n) is odd. Is a(n) squarefree? - David A. Corneth, Aug 13 2018

Crossrefs

Programs

  • PARI
    a(n) = {my(k=2); while (gcd(k, n^k - n) != 1, k++); k;} \\ Michel Marcus, Aug 13 2018
    
  • PARI
    a(n) = {my(k=3); while (gcd(k, n^k - n) != 1, k+=2; while(gcd(n, k) > 1, k+=2)); k} \\ David A. Corneth, Aug 13 2018

Extensions

More terms from Michel Marcus, Aug 13 2018

A316348 a(n) is the smallest k > 1 such that gcd(k, m^k - m) = 1 for all m = 2,...,n.

Original entry on oeis.org

35, 35, 77, 77, 143, 143, 143, 143, 299, 299, 323, 323, 323, 323, 437, 437, 667, 667, 667, 667, 899, 899, 899, 899, 899, 899, 1457, 1457, 1739, 1739, 1739, 1739, 1739, 1739, 1763, 1763, 1763, 1763, 2021, 2021, 2491, 2491, 2491, 2491, 3127, 3127, 3127, 3127, 3127
Offset: 2

Author

Thomas Ordowski, Aug 13 2018

Keywords

Comments

Conjecture: all the terms are in A121707.
From David A. Corneth, Aug 13 2018: (Start)
GCD(n, a(n)) = 1. a(n) is odd.
Is a(n) squarefree?
a(n+1) >= a(n) by definition. (End)
It seems that a(prime(n+1)-1) > a(prime(n)-1) for n > 1. - Thomas Ordowski, Aug 13 2018

Crossrefs

Programs

  • PARI
    isok(k, n)= {for (m=2, n, if (gcd(k, m^k - m) != 1, return (0));); return(1);}
    a(n) = {my(k=2); while (! isok(k, n), k++); k;} \\ Michel Marcus, Aug 13 2018

Formula

Conjecture: a(n) ~ n^2.

Extensions

More terms from Michel Marcus, Aug 13 2018

A318055 Numbers k such that gcd(k, 2^k - 2) = 1 and gcd(k, 3^k - 3) > 1.

Original entry on oeis.org

247, 403, 559, 715, 871, 1027, 1339, 1495, 1651, 1807, 1963, 2009, 2035, 2119, 2587, 2743, 2899, 2993, 3055, 3211, 3523, 3649, 3679, 3835, 3977, 3991, 4147, 4303, 4331, 4453, 4615, 4633, 4699, 4771, 4927, 5239, 5395, 5617, 5707, 5863, 5995, 6019, 6031, 6161, 6331, 6487, 6799, 6929, 6955, 7081, 7111
Offset: 1

Author

Thomas Ordowski, Aug 14 2018

Keywords

Comments

Odd numbers k such that gcd(k,2^(k-1)-1) = 1 and gcd(k,3^(k-1)-1) > 1.
It seems that a(n) == 91 (mod 156) for infinitely many n.
Fermat pseudoprimes to base 3 (A005935) in this sequence are 16531, 49051, 72041, ...

Crossrefs

Subsequence of A267999 and probably of A121707.
Cf. A139613(2n+1): it gives many terms of the sequence.
Cf. A005935.

Programs

  • GAP
    Filtered([1..10000],k->Gcd(k,2^k-2) = 1 and Gcd(k,3^k-3) > 1);  # Muniru A Asiru, Oct 07 2018
  • Maple
    select(k->gcd(k,2^k-2) = 1 and gcd(k,3^k-3) > 1,[$1..10000]); # Muniru A Asiru, Oct 07 2018
  • Mathematica
    Select[Range[8000], GCD[#, 2^# - 2] == 1 && GCD[#, 3^# - 3] > 1 &] (* Amiram Eldar, Mar 31 2024 *)
  • PARI
    isok(k) = (gcd(k,2^k-2) == 1) && (gcd(k,3^k-3) != 1); \\ Michel Marcus, Aug 14 2018
    

Extensions

More terms from Michel Marcus, Aug 14 2018

A260867 Least k > 1 that divides A260868(n) + 2^k - 2.

Original entry on oeis.org

35, 161, 55, 35, 115, 35, 115, 35, 77, 209, 473, 253, 55, 77, 35, 235, 247, 55, 35, 35, 899, 119, 1003, 415, 143, 35, 335, 95, 299, 497, 203, 575, 35, 247, 323, 95, 77, 437, 901, 35, 55, 473, 35, 1457, 77, 55, 517, 35, 235, 493, 161, 535, 209, 115, 95, 1067, 689, 323, 35, 1199, 1313, 355, 77, 815, 635, 869, 235, 119, 551, 55, 115
Offset: 1

Author

M. F. Hasler, Aug 11 2015

Keywords

Comments

For all numbers N not listed in A260868, the least k > 1 that divides N + 2^k - 2 is equal to the least prime factor of N.
It appears that the range of this sequence is A267999. For example, 155 occurs first somewhat late for N = 2729. - Corrected by Thomas Ordowski, Oct 27 2018

Programs

  • PARI
    my(aa(n)=for(k=2,9e9,Mod(2,k)^k+n-2||return(k)));for(n=2,1e5,aa(n)==factor(n)[1,1]||print1(aa(n)","))
Showing 1-10 of 10 results.