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.

User: Jonas Kaiser

Jonas Kaiser's wiki page.

Jonas Kaiser has authored 14 sequences. Here are the ten most recent ones:

A373864 Reduced Collatz function R applied to the numbers 6n+5: a(n) = R(6n+5), where R(k) = (3k+1)/2^r, with r as large as possible.

Original entry on oeis.org

1, 17, 13, 35, 11, 53, 31, 71, 5, 89, 49, 107, 29, 125, 67, 143, 19, 161, 85, 179, 47, 197, 103, 215, 7, 233, 121, 251, 65, 269, 139, 287, 37, 305, 157, 323, 83, 341, 175, 359, 23, 377, 193, 395, 101, 413, 211, 431, 55, 449, 229, 467, 119
Offset: 0

Author

Jonas Kaiser, Jun 19 2024

Keywords

Crossrefs

Programs

  • Mathematica
    A373864[n_] := #/2^IntegerExponent[#, 2] & [9*n + 8];
    Array[A373864, 100, 0] (* Paolo Xausa, Aug 19 2024 *)
  • PARI
    a(n) = n=9*n+8; n>>valuation(n,2);

Formula

a(n) = A000265(A017257(n)).

A373730 Reduced Collatz function R applied to the numbers 6n+1: a(n) = R(6n+1), where R(k) = (3k+1)/2^r, with r as large as possible.

Original entry on oeis.org

1, 11, 5, 29, 19, 47, 7, 65, 37, 83, 23, 101, 55, 119, 1, 137, 73, 155, 41, 173, 91, 191, 25, 209, 109, 227, 59, 245, 127, 263, 17, 281, 145, 299, 77, 317, 163, 335, 43, 353, 181, 371, 95, 389, 199, 407, 13, 425, 217, 443, 113, 461, 235, 479, 61, 497, 253, 515
Offset: 0

Author

Jonas Kaiser, Jun 17 2024

Keywords

Crossrefs

Programs

  • Mathematica
    A373730[n_] := #/2^IntegerExponent[#, 2] & [9*n + 2];
    Array[A373730, 100, 0] (* Paolo Xausa, Aug 19 2024 *)
  • PARI
    a(n) = n=9*n+2; n>>valuation(n,2);

Formula

a(n) = A000265(A017185(n)).

A355858 a(n) = n^(2*n-1) mod (2*n-1).

Original entry on oeis.org

0, 2, 3, 4, 8, 6, 7, 2, 9, 10, 8, 12, 18, 26, 15, 16, 29, 2, 19, 5, 21, 22, 8, 24, 18, 32, 27, 32, 50, 30, 31, 8, 63, 34, 26, 36, 37, 32, 30, 40, 80, 42, 8, 11, 45, 32, 35, 22, 49, 35, 51, 52, 8, 54, 55, 14, 57, 87, 8, 2, 94, 77, 68, 64, 113, 66, 53, 107, 69
Offset: 1

Author

Jonas Kaiser, Jul 20 2022

Keywords

Comments

If a(n) = n then 2*n-1 is prime or Fermat pseudoprime to base 2.

Programs

  • Mathematica
    a[n_] := PowerMod[n, 2*n - 1, 2*n - 1]; Array[a, 100] (* Amiram Eldar, Jul 23 2022 *)
  • PARI
    a(n)=n^(2*n-1)%(2*n-1)
    
  • PARI
    a(n)=lift(Mod(n, 2*n-1)^(2*n-1)) \\ Rémy Sigrist, Jul 21 2022
    
  • Python
    def a(n): return pow(n, 2*n-1, 2*n-1)
    print([a(n) for n in range(1, 70)]) # Michael S. Branicky, Jul 23 2022

A294187 Numbers k == 77 (mod 120) such that (2*k-1)*2^((k-1)/2), (2*k-1)*3^((k-1)/2) and (2*k-1)*5^((k-1)/2) are congruent to 1 (mod k).

Original entry on oeis.org

197, 317, 557, 677, 797, 1277, 1637, 1877, 1997, 2237, 2357, 2477, 2837, 2957, 3557, 3677, 3797, 3917, 4157, 4397, 4517, 4637, 4877, 5237, 5477, 5717, 6197, 6317, 6917, 7517, 7757, 7877, 8117, 8237, 8597, 8837, 9437, 9677, 10037
Offset: 1

Author

Jonas Kaiser, Feb 11 2018

Keywords

Comments

There are no composite numbers up to 2*10^17. The first composite term is 229467972529064957.

Crossrefs

Cf. A001567.

Programs

  • GAP
    Filtered([1..11000],k->k mod 120 = 77 and (2*k-1)*2^((k-1)/2) mod k = 1 and (2*k-1)*3^((k-1)/2) mod k = 1 and (2*k-1)*5^((k-1)/2) mod k = 1); # Muniru A Asiru, Mar 11 2018
  • Maple
    a:=k->`if`(k mod 120 = 77 and (2*k-1)*2^((k-1)/2) mod k = 1 and (2*k-1)*3^((k-1)/2) mod k = 1 and (2*k-1)*5^((k-1)/2) mod k = 1,k,NULL): seq(a(k),k=1..50); # Muniru A Asiru, Mar 11 2018
  • Mathematica
    k = 77; lst = {}; While[k < 12000, If[Mod[(2k -1) PowerMod[{2, 3, 5}, (k -1)/2, k], k] == {1, 1, 1}, AppendTo[lst, k]]; k += 120]; lst (* Robert G. Wilson v, Feb 13 2018 *)
  • PARI
    is(n) = n%120==77 &&(2*n-1)* Mod(2, n)^((n-1)\2)==1 &&(2*n-1)* Mod(3, n)^((n-1)\2)==1 &&(2*n-1)* Mod(5, n)^((n-1)\2)==1 \\
    

A300101 a(n) = (pp-1)/x, where pp = A001567(n) and x = ord(2,pp), the smallest positive integer such that 2^x == 1 (mod pp).

Original entry on oeis.org

34, 14, 23, 46, 77, 48, 68, 186, 44, 75, 47, 117, 112, 273, 19, 312, 390, 10, 221, 160, 106, 45, 342, 42, 157, 64, 229, 237, 699, 345, 714, 352, 348, 668, 195, 285, 575, 487, 56, 163, 502, 9, 357, 439, 310, 296, 208, 803, 151, 684, 217, 2038, 324, 315, 1666, 344, 1973, 319, 607, 2763, 62, 1777, 1122, 1360, 1135, 2603
Offset: 1

Author

Jonas Kaiser, Feb 24 2018

Keywords

Comments

For primes, this definition has a clear distribution over the natural numbers (see A001917), whereas there is no such distribution for pseudoprimes. Among the first 10^6 pseudoprimes of this sequence, the smallest number is 9. Are there any numbers in this sequence which are smaller than 9?
There is no value smaller than 9 for all the pseudoprimes below 2^64. - Amiram Eldar, Nov 09 2023

Crossrefs

Programs

  • Mathematica
    ((# - 1)/MultiplicativeOrder[2, #]) & /@ Select[Range[10^5], CompositeQ[#] && PowerMod[2, # - 1, #] == 1 &] (* Amiram Eldar, Nov 09 2023 *)
  • PARI
    is_A001567(n)={Mod(2, n)^n==2 & !isprime(n) & n>1};
    lista(nn) = {for (n=1, nn, if (is_A001567(n), print1((n-1)/znorder(Mod(2, n)), ", ");););} \\ Michel Marcus, Feb 25 2018

Formula

a(n) = (A001567(n) - 1) / A306413(n). - Jianing Song, Dec 12 2021

A294092 Numbers k == 119 (mod 120) such that 2^((k-1)/2), 3^((k-1)/2) and 5^((k-1)/2) are congruent to 1 (mod k).

Original entry on oeis.org

239, 359, 479, 599, 719, 839, 1319, 1439, 1559, 2039, 2399, 2879, 2999, 3119, 3359, 3719, 4079, 4679, 4799, 4919, 5039, 5279, 5399, 5519, 5639, 5879, 6359, 6599, 6719, 6959, 7079, 7559, 7919, 8039, 8999, 9239, 9479, 9719, 9839, 10079, 10559, 10799, 11159, 11279
Offset: 1

Author

Jonas Kaiser, Feb 09 2018

Keywords

Comments

So far no composite numbers have been found in this sequence. There are no pseudoprimes up to 2^64 in this sequence, so a composite term in this sequence has to exceed 18446744066047760377.

Crossrefs

Cf. A001567. Subsequence of A295835.

Programs

  • GAP
    Filtered([1..14000],n->n mod 120=119 and 2^((n-1)/2) mod n =1 and 3^((n-1)/2) mod n =1 and 5^((n-1)/2) mod n =1); # Muniru A Asiru, Feb 15 2018
  • Mathematica
    k = 119; lst = {}; While[k < 12000, If[ PowerMod[{2, 3, 5}, (k - 1)/2, k] == {1, 1, 1}, AppendTo[lst, k]];  k += 120]; lst (* Robert G. Wilson v, Feb 11 2018 *)
  • PARI
    is(n) = n%120==119 && Mod(2, n)^((n-1)\2)==1 && Mod(3, n)^((n-1)\2)==1 && Mod(5, n)^((n-1)\2)==1
    
  • Python
    A294092_list, k, m = [], 119, 59
    while len(A294092_list) < 10000:
        if pow(2,m,k) == 1 and pow(3,m,k) == 1 and pow(5,m,k) == 1:
            A294092_list.append(k)
        k += 120
        m += 60 # Chai Wah Wu, Feb 09 2018
    

Extensions

More terms from Chai Wah Wu, Feb 10 2018

A295835 Numbers k == 3 (mod 4) such that 2^((k-1)/2), 3^((k-1)/2) and 5^((k-1)/2) are congruent to 1 (mod k).

Original entry on oeis.org

71, 191, 239, 311, 359, 431, 479, 599, 719, 839, 911, 1031, 1151, 1319, 1439, 1511, 1559, 1871, 2039, 2111, 2351, 2399, 2591, 2711, 2879, 2999, 3119, 3191, 3359, 3671, 3719, 3911, 4079, 4271, 4391, 4679, 4751, 4799, 4871, 4919, 5039, 5231, 5279, 5351, 5399, 5471
Offset: 1

Author

Jonas Kaiser, Nov 28 2017

Keywords

Comments

There are very few composite numbers in this sequence: The probability of catching a pseudoprime number (A001567) with this definition is estimated at 1 in 263 billion.
Composite numbers in the sequence include the Carmichael numbers 131314855918751, 23282264781147191, 70122000249565031, 104782993259720471, 583701149409931151, 870012810301712351. - Robert Israel, Nov 28 2017
With the exception of the pseudoprimes, it seems that this is a subsequence of A139035. Primes of this form (A139035) have two special properties. 1. There exists a smallest m of the form m = (A139035 - 1)/2 such that 2^m == 1 (mod A139035). 2. m is odd. The core of this definition is based on these two properties. The term 2^((k-1)/2) == 1 (mod n) is based on the first property, while the term k == 3 (mod 4) is based on the second property. The terms 3^((k-1)/2) == 1 (mod n) and 5^((k-1)/2) == 1 (mod n) I just tried freely to Fermat.
Prime terms are congruent to 71 or 119 modulo 120. - Jianing Song, Nov 22 2018 [This is because 2, 3, and 5 must be quadratic residues modulo every prime number in this sequence. - Jianing Song, Sep 01 2024]
From Jianing Song, Sep 03 2024: (Start)
Compare this sequence to the sequence of absolute Euler pseudoprimes (A033181): odd composite numbers k such that a^((k-1)/2) == +-1 (mod k) for every a coprime to k. Such numbers k satisfy 2*psi(k) | (k-1), where psi = A002322, so we must have k == 1 (mod 4).
All terms in this sequence are congruent to 7 modulo 8. In fact, taking the Jacobi symbol modulo k (which only depends on the remainder modulo k) of both sides of 2^((k-1)/2) == 1 (mod k) yields (2/k)^((k-1)/2) = 1. Since k == 3 (mod 4), we have that (k-1)/2 is odd, so (2/k) = 1, which means that k == 7 (mod 8). (End)
Those numbers given above by Robert Israel are all congruent to 71 modulo 120. There are no known composite terms congruent to 119 modulo 120; cf. A294092. - Bill McEachen and Jianing Song, Sep 05 2024

Crossrefs

A294092 is a subsequence.

Programs

  • Maple
    filter:= proc(n) [2&^((n-1)/2),3&^((n-1)/2), 5&^((n-1)/2)] mod n = [1,1,1]  end proc:
    select(filter, [seq(i,i=3..10000,4)]); # Robert Israel, Nov 28 2017, corrected Feb 26 2018
  • Mathematica
    fQ[n_] := PowerMod[{2, 3, 5}, (n - 1)/2, n] == {1, 1, 1}; Select[3 + 4Range@ 1500, fQ] (* Michael De Vlieger, Nov 28 2017 and slightly modified by Robert G. Wilson v, Feb 26 2018 based on the renaming *)
  • PARI
    is(n) = n%4==3 && Mod(2, n)^(n\2)==1 && Mod(3, n)^(n\2)==1 && Mod(5, n)^(n\2)==1 && Mod(2, n)^logint(n+1,2)!=1 \\ Charles R Greathouse IV, Nov 28 2017

Extensions

Definition corrected by Jonas Kaiser, Feb 05 2018

A295607 a(n) = A001567(n) - 2^floor(log_2(A001567(n))).

Original entry on oeis.org

85, 49, 133, 81, 363, 705, 881, 1023, 417, 653, 773, 1229, 1985, 273, 275, 585, 1365, 2505, 3861, 129, 289, 719, 2069, 2393, 3113, 4609, 5549, 5555, 5789, 6299, 7517, 7649, 321, 2321, 2337, 3567, 6617, 6993, 9377, 12957, 13737, 14505, 15033, 15225, 15237, 385, 2177, 2565, 7097, 8273, 8897
Offset: 1

Author

Jonas Kaiser, Nov 24 2017

Keywords

Comments

This sequence contains the distances from pseudoprime numbers (A001567) to the next smaller number of the form 2^n. Conjecture: It seems that these distances do not take all possible values. So, if we know that a certain distance does not appear with pseudoprime numbers, we are able to calculate these numbers using Fermat's little theorem and we know for sure that they are primes.

Examples

			There are no pseudoprimes detected by Fermat's little theorem for 2^k+m with m = {3,5,7,...,47} up to k = 10000 (checked using the Pari function ispseudoprime(k)). When this sequence is ordered for the first 10^5 pseudoprimes, the following first terms (up to 1000) result: 1, 49, 81, 85, 129, 133, 273, 275, 289, 321, 363, 385, 417, 585, 653, 705, 719, 773, 881.
		

Crossrefs

Cf. A001567.

Programs

  • Mathematica
    Map[# - 2^Floor@ Log2@ # &, Select[Range[3, 10^5, 2], And[! PrimeQ[#], PowerMod[2, (# - 1), #] == 1] &]] (* Michael De Vlieger, Nov 26 2017 *)
  • PARI
    a(A001567)=A001567-2^(floor(log(A001567)/log(2))) \\

A295196 Numbers n > 1 such that 2^(n-1) and (2*n-m)*2^(((n-1)/2) - floor(log_2(n))) are congruent to 1 (mod n) for at least one of m = 3, m = 7 and m = 15.

Original entry on oeis.org

7, 23, 31, 47, 71, 79, 263, 271, 1031, 1039, 2063, 4111, 32783, 65543, 65551, 262151, 1048583, 4194319, 8388623, 67108879, 268435463, 1073741831, 1073741839, 4294967311
Offset: 1

Author

Jonas Kaiser, Nov 16 2017

Keywords

Comments

This definition arises from the conjecture that pseudoprime numbers (A001567) occur only at certain distances m from the next smaller number of the form 2^n. So, if we know that a certain distance does not appear with pseudoprime numbers, we are able to calculate these numbers using Fermat's little theorem and we know that it has to be prime. To "plot" the distance of pseudoprime numbers to 2^n use m = A001567(n) - 2^floor(log_2(A001567(n))). So, the first values of m which do not have a "safe prime number distance" (values with "safe prime number distance" are those values for m which pseudoprime numbers never have) should be m = 1, 49, 81, 85, 129, 133, 273, 275, 289, 321, ....
Conjecture 1: There are no composite numbers in this sequence and perhaps infinitely many primes.
Conjecture 2: For m = 7 this definition generates A104066 and for m = 15 this definition generates A144487 (A057197).
Conjecture 3: There are (infinitely many?) m for which this definition generates nothing but (infinitely many?) primes of the form p = 2^k + m.
It appears that this sequence is a subsequence of A139035.

Programs

  • Mathematica
    twoDistableQ[n_] := MemberQ[Mod[(2n - {3, 7, 15}) PowerMod[2, (n - 1)/2 - Floor@ Log2@ n, n], n], 1]; p = 3; twoDistablesList = {}; While[p < 1000000000, If[twoDistableQ@ p, AppendTo[ twoDistablesList, p]]; p = NextPrime@ p]; twoDistablesList (* Robert G. Wilson v, Nov 17 2017 *)
  • PARI
    a(n) = (n%2) && lift((Mod(2, n)^(n-1))==1) && (lift((Mod((2*n-3), n)*Mod(2, n)^(((n-1)/2)-floor(log(n)/log(2)))) == 1)||lift((Mod((2*n-7), n)*Mod(2, n)^(((n-1)/2)-floor(log(n)/log(2)))) == 1)||lift((Mod((2*n-15), n)*Mod(2, n)^(((n-1)/2)-floor(log(n)/log(2)))) == 1))
    
  • PARI
    is(n)=if(Mod(2,n)^(n-1)!=1, return(0)); my(m=Mod(2,n)^(n\2-logint(n,2))); ((2*n-3)*m==1 || (2*n-7)*m==1 || (2*n-15)*m==1) && n>1 \\ Charles R Greathouse IV, Nov 17 2017

Extensions

a(17)-a(24) from Charles R Greathouse IV, Nov 17 2017

A294993 Numbers n > 1 such that all of 2^(n-1), 3^(n-1), 5^(n-1), (2*n-1)*(2^((n-1)/2)), 4*ceiling((3/4)*n)-2, and (2^((n+1)/2) + floor(n/4)*2^((n+3)/2)) are congruent to 1 (mod n).

Original entry on oeis.org

11, 19, 43, 59, 67, 83, 107, 131, 139, 163, 179, 211, 227, 251, 283, 307, 331, 347, 379, 419, 443, 467, 491, 499, 523, 547, 563, 571, 587, 619, 643, 659, 683, 691, 739, 787, 811, 827, 859, 883, 907, 947, 971, 1019, 1051, 1091, 1123, 1163, 1171, 1187, 1259, 1283
Offset: 1

Author

Jonas Kaiser, Nov 12 2017

Keywords

Comments

It appears that A007520 is a subsequence. Up to 10^7 there are no composites in this sequence.
The first composite is a(17465859) = 1397357851; there are probably infinitely many. - Charles R Greathouse IV, Nov 12 2017

Crossrefs

Programs

  • Mathematica
    Select[Range[2, 1300], Function[n, AllTrue[Join[Prime[Range@3]^(n - 1), {(2 n - 1) (2^((n - 1)/2)), 4 Ceiling[3 n/4] - 2, (2^((n + 1)/2) + Floor[n/4]*2^((n + 3)/2))}], Mod[#, n] == 1 &]]] (* Michael De Vlieger, Nov 15 2017 *)
  • PARI
    is(n) = n%2 && Mod(2, n)^(n-1)==1 && Mod(3, n)^(n-1)==1 && Mod(5, n)^(n-1)==1 && (2*n-1)*Mod(2, n)^((n-1)/2)== 1 && Mod(4*ceil((3/4)*n)-2, n)==1 && Mod(2, n)^((n+1)/2)+floor(n/4)*Mod(2, n)^((n+3)/2)==1