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 61-70 of 144 results. Next

A163427 Primes p such that (p+1)^3/8+(p-1)/2 is also prime.

Original entry on oeis.org

5, 7, 13, 19, 29, 31, 41, 53, 71, 101, 103, 109, 173, 191, 199, 223, 229, 233, 239, 257, 269, 277, 331, 383, 397, 431, 491, 569, 571, 599, 619, 631, 719, 733, 751, 757, 761, 823, 857, 859, 863, 887, 907, 937, 967, 971, 977, 1009, 1019, 1063, 1069, 1123, 1163
Offset: 1

Views

Author

Keywords

Comments

Primes A000040(k) such that (A006254(k-1))^3+ A005097(k-1) is also prime.

Examples

			For p=5, (5+1)^3/8+(5-1)/2=27+2=29, prime, which adds p=5 to the sequence.
For p=7, (7+1)^3/8+(7-1)/2=67, prime, which adds p=7 to the sequence.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesInInterval(3, 1200) | IsPrime((p+1)^3 div 8+(p-1) div 2)]; // Vincenzo Librandi, Apr 09 2013
  • Mathematica
    f[n_]:=((p+1)/2)^3+((p-1)/2); lst={};Do[p=Prime[n];If[PrimeQ[f[p]],AppendTo[lst, p]],{n,6!}];lst
    Select[Prime[Range[100]], PrimeQ[(# + 1)^3 / 8 + (# - 1) / 2]&] (* Vincenzo Librandi, Apr 09 2013 *)

Formula

(a(n)+1)^3/8+(a(n)-1)/2 = A163426(n).

Extensions

Edited by R. J. Mathar, Aug 24 2009

A380550 List of numbers not of the form i + 3*j + 4*i*j for i, j >= 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 14, 16, 17, 19, 20, 21, 25, 26, 27, 30, 31, 32, 34, 37, 39, 40, 41, 44, 45, 47, 49, 52, 54, 55, 56, 59, 62, 65, 66, 67, 70, 72, 75, 76, 77, 81, 82, 84, 86, 89, 91, 94, 95, 102, 104, 107, 109, 110, 111, 115, 116, 117, 119, 121, 122, 124, 125, 129, 130, 135, 136, 140, 142, 144, 146, 147, 149
Offset: 1

Views

Author

Peter Bala, Jan 26 2025

Keywords

Comments

This is a companion sequence to A380572. It is the complementary sequence to A380549.
Compare with A006093, numbers not of the form i + j + i*j, and A005097, numbers not of the form i + j + 2*i*j.
Apart from a(6) = 6, this sequence consists of all the positive integers N such that 4*N + 3 is either a prime or three times a prime.

Examples

			Factorization of 4*a(n) + 3 for n = 1..78:
[7,  11, 3*5, 19, 23, 3^3, 31, 3*13, 43, 47, 3*17, 59, 67, 71, 79, 83, 3*29, 103, 107, 3*37, 3*41, 127, 131, 139, 151, 3*53, 163, 167, 179, 3*61, 191, 199, 211, 3*73, 223, 227, 239, 251, 263, 3*89, 271, 283, 3*97, 3*101, 307, 311, 3*109, 331, 3*113, 347, 359, 367, 379, 383, 3*137, 419, 431, 439, 443, 3*149, 463, 467, 3*157, 479, 487, 491, 499, 503, 3*173, 523, 3*181, 547, 563, 571, 3*193, 587, 3*197, 599]
		

Crossrefs

Programs

  • Maple
    L := 150: N := {seq(n, n= 1..L)}: S := {}:
    for i from 1 to L do
      for j from 1 to L do
        if i + 3*j + 4*i*j <= L then S := `union`(S, {i+3*j+4*i*j}) end if
      end do;
    end do:
    N minus S;

A380572 Complement of A380509.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 13, 14, 15, 17, 18, 22, 23, 24, 25, 27, 28, 32, 34, 35, 37, 39, 43, 44, 45, 48, 49, 50, 53, 57, 58, 59, 60, 62, 64, 67, 69, 70, 73, 77, 78, 79, 80, 84, 87, 88, 93, 95, 97, 98, 99, 100, 102, 104, 105, 108, 111, 112, 113, 114, 115, 122
Offset: 1

Views

Author

Davide Rotondo, Jan 27 2025

Keywords

Comments

4*a(n) + 1 or (4*a(n) + 1)/3 is a prime number.
Compare with A380550, numbers not of the form i + 3*j + 4*i*j. See also A006093, numbers not of the form i + j + i*j and A005097, numbers not of the form i + j + 2*i*j. - Peter Bala, Jan 30 2025

Crossrefs

Programs

  • Maple
    S := {}:
    for n from 1 to 150 do
      if isprime(4*n+1) then S := `union`(S, {n}) fi;
      if type((4*n+1)*(1/3), integer) then if isprime((4*n+1)*(1/3)) then S := `union`(S, {n}) fi; fi;
    end do:
    S; # Peter Bala, Jan 30 2025

A053662 Numbers k such that 2k+1 divides k!+1.

Original entry on oeis.org

3, 5, 9, 21, 23, 33, 39, 51, 63, 65, 81, 89, 95, 99, 113, 131, 173, 183, 191, 209, 215, 221, 239, 245, 251, 261, 281, 285, 299, 303, 309, 315, 341, 345, 363, 369, 371, 393, 411, 419, 431, 443, 473, 495, 509, 525, 543, 545, 561, 575, 593, 645, 659, 683, 711
Offset: 1

Views

Author

Chris K. Caldwell, Feb 16 2000

Keywords

Comments

k+1 divides k!+1 gives primes-1 by Wilson's Theorem. For the present sequence, there are 309 terms below 5000, compared with 669 primes (309/669 = 0.461...). There are 553 terms below 10000, compared with 1229 primes (553/1229 = 0.449...). - Ed Pegg Jr, Dec 05 2001

Crossrefs

Programs

  • GAP
    Filtered([1..1000], n-> (Factorial(n)+1) mod (2*n+1)=0) # G. C. Greubel, May 18 2019
  • Magma
    [n: n in [1..1000] | (Factorial(n)+1) mod (2*n+1) eq 0 ]; // G. C. Greubel, May 18 2019
    
  • Maple
    A053662:=n->`if`(n!+1 mod (2*n+1) = 0, n, NULL): seq(A053662(n), n=1..1000); # Wesley Ivan Hurt, Dec 01 2015
  • Mathematica
    Drop[Union[Table[If[IntegerQ[(n!+1)/(2n+1)], n], {n, 1, 1000}]], -1] (* Ed Pegg Jr, Dec 05 2001 *)
    Select[Range[1000], Mod[#! +1, 2*# +1] == 0 &] (* G. C. Greubel, May 18 2019 *)
  • PARI
    for(n=1,10^3, if((n!+1)%(2*n+1)==0, print1(n,", ")) ) \\ G. C. Greubel, May 18 2019
    
  • Sage
    [n for n in (1..1000) if Mod(factorial(n)+1, 2*n+1)==0 ] # G. C. Greubel, May 18 2019
    

Formula

a(n) >> n log n. - Charles R Greathouse IV, Apr 16 2024

A061066 a(n) = (prime(n)^2 - 1)/8.

Original entry on oeis.org

1, 3, 6, 15, 21, 36, 45, 66, 105, 120, 171, 210, 231, 276, 351, 435, 465, 561, 630, 666, 780, 861, 990, 1176, 1275, 1326, 1431, 1485, 1596, 2016, 2145, 2346, 2415, 2775, 2850, 3081, 3321, 3486, 3741, 4005, 4095, 4560, 4656, 4851, 4950, 5565, 6216, 6441
Offset: 2

Views

Author

Labos Elemer, May 28 2001

Keywords

Comments

This sequence is a subsequence of the triangular numbers (A000217) because (prime(n)^2-1)/8 = ((2m+1)^2-1)/8 = m(m+1)/2 where p=2m+1 for a given m. - David Morales Marciel, Oct 07 2015
The Jacobi symbol (2|p) = (-1)^((p^2-1)/8). - Michael Somos, Feb 17 2020
Number of inversions of the permutation ((2*i) mod p){1<=i<=p-1} = (2,4,...,p-1,1,3,...,p-2) of {1,2,...,p-1}, where p = prime(n). - _Jianing Song, Apr 07 2023

Examples

			a(2) = 1 because p = prime(2) = 3 and (3^2-1)/8 = 1. - _Michael Somos_, Feb 17 2020
		

References

  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 307.

Crossrefs

Programs

Formula

a(n) = A000217(A005097(n-1)). - after first comment, Michel Marcus, Oct 07 2015
a(n) = (3/8)*A024700(n-2). - G. C. Greubel, May 03 2024

A061285 a(n) = 2^((prime(n) - 1)/2).

Original entry on oeis.org

2, 4, 8, 32, 64, 256, 512, 2048, 16384, 32768, 262144, 1048576, 2097152, 8388608, 67108864, 536870912, 1073741824, 8589934592, 34359738368, 68719476736, 549755813888, 2199023255552, 17592186044416, 281474976710656, 1125899906842624, 2251799813685248
Offset: 2

Views

Author

Labos Elemer, May 22 2001

Keywords

Comments

Square root of 2^(prime(n) - 1), i.e., the smallest number that has prime(n) divisors.

Crossrefs

Programs

  • Mathematica
    Table[2^((Prime[n] - 1)/2), {n, 2, 25}] (* Amiram Eldar, Dec 23 2020 *)

Formula

a(n) = sqrt(min(x; A000005(x) = prime(n))) = sqrt(A034785(n)/2) = sqrt(2^(prime(n) - 1)) = sqrt(2^A006093(n)) = sqrt(2^phi(prime(n))) = sqrt(2^A000010(A000040(n))).
Sum_{n>=1} 1/a(n) = A217054. - Amiram Eldar, Dec 23 2020

A064673 Where the least prime p such that n = (p-1)/(q-1) and p > q is not the least prime == 1 (mod n) (A034694).

Original entry on oeis.org

24, 32, 34, 38, 62, 64, 71, 76, 80, 92, 94, 104, 110, 117, 122, 124, 129, 132, 144, 149, 152, 154, 159, 164, 167, 182, 184, 185, 188, 201, 202, 206, 212, 214, 218, 220, 225, 227, 236, 242, 244, 246, 252, 264, 269, 272, 274, 286, 290, 294
Offset: 1

Views

Author

Robert G. Wilson v, Oct 16 2001

Keywords

Examples

			24 is in the sequence because (97-1)/(5-1) whereas the first prime ==1 (Mod 24) is 73. See the comment in A034694 about the multiplier k and it must differ from q-1 or k+1 is not prime.
		

Crossrefs

Cf. A034694, A064632, A064652. Disjoint from A005097 and A006093.

Programs

  • Maple
    f:= proc(n) local k;
      for k from n+1 by n do
        if isprime(k) then return k fi
      od
    end proc:
    filter:= proc(n) local p;
        p:= f(n);
        not isprime(1+(p-1)/n)
    end proc:
    select(filter, [$1..1000]); # Robert Israel, May 09 2024
  • Mathematica
    NextPrim[n_] := (k = n + 1; While[ !PrimeQ[k], k++ ]; k); Do[p = 2; While[q = (p - 1)/n + 1; !PrimeQ[q] || q >= p, p = NextPrim[p]]; k = 1; While[ !PrimeQ[k*n + 1], k++ ]; If[p != k*n + 1, Print[n]], {n, 2, 300} ]

A065824 Smallest solution m to (n+1)*phi(m) = n*sigma(m), or -1 if no solution exists.

Original entry on oeis.org

3, 5, 7, 323, 11, 13, 899, 17, 19, 1763, 23, 5249, 3239, 29, 31, 979801, 5459, 37, 10763, 41, 43, 9179, 47, 9701, 10403, 53, 12319, 5646547, 59, 61, 24569, 19109, 67, 19043, 71, 73, 22499, 50819, 79, 41309, 83, 32639, 46979, 89, 34579, 39059, 125969
Offset: 1

Views

Author

Labos Elemer, Nov 23 2001

Keywords

Comments

If p = a(n) is a prime solution, then (n+1)*(p-1) = n*(p+1) and p = 2n+1, so position for p if it is in fact a minimal solution is at n = (p-1)/2. E.g. 29 appears at 14th position shown by A005097. On the other hand large and (seemingly always composite) solutions arise at indices shown essentially by A047845. Also, differences between the sites of two consecutive small prime solutions appears to be d/2, half the difference between consecutive primes (A001223).

Crossrefs

Programs

  • Mathematica
    max = 10^7; a[n_] := For[m = 3, m <= max, m++, If[(n+1)*EulerPhi[m] == n*DivisorSigma[1, m], Print[m]; Return[m]]] /. Null -> -1; Array[a, 50] (* Jean-François Alcover, Oct 08 2016 *)
  • Python
    from itertools import count
    from math import prod
    from sympy import factorint
    def A065824(n):
        for m in count(1):
            f = factorint(m)
            if (n+1)*m*prod((p-1)**2 for p in f)==n*prod(p**(e+2)-p for p,e in f.items()):
                return m # Chai Wah Wu, Aug 12 2024

Formula

(n+1)*A000010(a(n)) = n*A000203(a(n)), smallest x=a(n) solutions.

A067849 a(n) = max{k: f(n),...,f^k(n) are prime}, where f(m) = 2m+1 and f^k denotes composition of f with itself k times.

Original entry on oeis.org

2, 4, 1, 0, 3, 1, 0, 1, 1, 0, 2, 0, 0, 2, 1, 0, 0, 1, 0, 3, 1, 0, 1, 0, 0, 2, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 2, 0, 0, 6, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 5, 1
Offset: 1

Views

Author

Joseph L. Pe, Feb 14 2002

Keywords

Comments

From Glen Whitney, Sep 14 2022: (Start)
If a(n) > 3 and n > 5, then the final digit of n is 4 or 9.
a(n) > 0 if and only if n appears in A005097.
More generally, a(n) > m if and only if all of 2^k(n+1) - 1 for 0 <= k <= m are in A005097.
Creating a tile labeled by a multiple of p for a prime p with a relatively large value of a(p) is considered valuable in the game DIVE (see links). (End)

Examples

			f(2) = 5, f(f(2)) = 11, f(f(f(2))) = 23, f(f(f(f(2)))) = 47, all prime, but f^5(2) = 95 is not prime, so a(2) = 4.
		

Programs

  • Mathematica
    f[n_] := Module[{a = 2n + 1, i = 0}, While[PrimeQ[a], i++; a = 2a + 1]; i]; Table[f[i], {i, 1, 60}]
  • PARI
    a(n) = {my(nb = 0, newn); while (isprime(newn=2*n+1), nb++; n = newn); nb;} \\ Michel Marcus, Nov 10 2018

Extensions

More terms from Michel Marcus, Nov 10 2018

A073409 Largest prime factor of the denominator of the Bernoulli number B(2*n) (A002445).

Original entry on oeis.org

3, 5, 7, 5, 11, 13, 3, 17, 19, 11, 23, 13, 3, 29, 31, 17, 3, 37, 3, 41, 43, 23, 47, 17, 11, 53, 19, 29, 59, 61, 3, 17, 67, 5, 71, 73, 3, 5, 79, 41, 83, 43, 3, 89, 31, 47, 3, 97, 3, 101, 103, 53, 107, 109, 23, 113, 7, 59, 3, 61, 3, 5, 127, 17, 131, 67, 3, 137, 139, 71, 3, 73, 3, 149
Offset: 1

Views

Author

Benoit Cloitre, Aug 23 2002

Keywords

Comments

Least k such that k!*B(2n) is an integer where B(2n) denotes the 2n-th Bernoulli number.
a((p-1)/2) = p, where p is odd prime. All odd primes appear in this sequence. The very first appearance of odd prime p is a((p-1)/2). - Alexander Adamchuk, Jul 31 2006
Conjecture: a(n) is the largest prime p <= 2n+1 such that p * A000367(n) == - A002445(n) (mod p^2) for n > 0. Note that 2^(2n) == 1 (mod a(n)), since a(n) is the largest prime p such that b^(2n)== 1 (mod p) for every b coprime to p; i.e., a(n) is the largest prime p such that p-1 | 2n. - Thomas Ordowski, May 17 2020

Crossrefs

Programs

  • Mathematica
    Table[FactorInteger[Denominator[BernoulliB[2n]]][[ -1, 1]], {n, 100}]
  • PARI
    a(n)=
    {
        my(bd=1);
        forprime (p=2, 2*n+1, if( (2*n)%(p-1)==0, bd=p ) );
        return(bd);
    }
    /* Joerg Arndt, May 06 2012 */
    
  • PARI
    a(n)=my(p); fordiv(n,d, if(isprime(p=2*n/d+1), return(p))) \\ Charles R Greathouse IV, Jun 08 2020
Previous Showing 61-70 of 144 results. Next