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-4 of 4 results.

A109274 Numbers k such that k+1 is prime, 2k+1 composite.

Original entry on oeis.org

4, 10, 12, 16, 22, 28, 40, 42, 46, 52, 58, 60, 66, 70, 72, 82, 88, 100, 102, 106, 108, 112, 126, 130, 136, 148, 150, 162, 166, 172, 178, 180, 190, 192, 196, 222, 226, 232, 238, 240, 250, 256, 262, 268, 276, 280, 282, 292, 310, 312, 316, 346, 348, 352, 358
Offset: 1

Views

Author

Zak Seidov, Jun 25 2005

Keywords

Comments

Includes all terms from A109273.

Crossrefs

Programs

  • Mathematica
    Select[Range[358],PrimeQ[#+1]&&CompositeQ[2#+1]&] (* James C. McMahon, Mar 05 2024 *)
  • PARI
    isok(n) = isprime(n+1) && !isprime(2*n+1); \\ Michel Marcus, Oct 06 2013

Formula

a(n) = A307390(n) - 1. - Bhavik Mehta, Aug 14 2024

Extensions

Corrected by Michel Marcus, Oct 06 2013

A307055 Even k such that psi(m) = k has no solution, where psi is the Dedekind psi function A001615.

Original entry on oeis.org

2, 10, 16, 22, 26, 28, 34, 40, 46, 50, 52, 58, 64, 66, 70, 76, 78, 82, 86, 88, 92, 94, 100, 106, 116, 118, 122, 124, 130, 134, 136, 142, 146, 148, 154, 156, 166, 170, 172, 178, 184, 188, 190, 196, 202, 206, 208, 210, 214, 218, 220, 226, 232, 236, 238, 244, 246, 250
Offset: 1

Views

Author

Torlach Rush, Mar 21 2019

Keywords

Comments

Analog of the nontotients A005277.
Contains 2*p if p is in A307390. - Robert Israel, Apr 17 2019

Examples

			2 is a term because there exists no m such that psi(m) = 2.
4 is not a term because 4 = 3*(3+1)/3.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    psi:= proc(n) local p; n*mul(1+1/p, p=numtheory:-factorset(n)) end proc:
    sort(convert({seq(i,i=2..N,2)} minus map(psi, {$1..N}), list)); # Robert Israel, Apr 17 2019
  • Mathematica
    M = 1000; (* to get all terms <= M *)
    psi[n_] := n Sum[MoebiusMu[d]^2/d, {d, Divisors[n]}];
    Range[2, M, 2] ~Complement~ (psi /@ Range[M]) (* Jean-François Alcover, Aug 01 2020, after Maple *)
  • PARI
    dpsi(n) = = n * sumdivmult(n, d, issquarefree(d)/d); \\ A001615
    isok(n) = {if (!(n%2), for (k=1, n-1,  if (dpsi(k) == n, return(0));); return (1););} \\ Michel Marcus, Mar 22 2019

A309769 Even numbers m having at least one odd prime divisor p for which there exists a positive integer k < p-1 such that p-k|m-k.

Original entry on oeis.org

20, 28, 42, 44, 50, 52, 66, 68, 70, 76, 78, 80, 88, 92, 102, 104, 110, 112, 114, 116, 124, 130, 136, 138, 140, 148, 152, 154, 156, 164, 170, 172, 174, 176, 182, 184, 186, 188, 190, 196, 200, 204, 208, 212, 222, 228, 230, 232, 236, 238, 242, 244, 246, 248, 252
Offset: 1

Views

Author

David James Sycamore, Aug 16 2019

Keywords

Comments

Complement in A005843 of A309239. Every odd number > 1 has the property mentioned in Name, but these are the only even numbers with this property. No term is either a power of 2 or a semiprime. A number m is a term if and only if m = 2rp, where r >= 2, and p is a prime > q, the smallest prime divisor of 2r-1 (k=p-q). For any given r, 2rz is the smallest multiple of 2r in this sequence, where z=nextprime(q). If m = 2rp is a term and 2r-1 is prime, then p is the greatest prime divisor of m (the converse is not true; e.g., m=70=10*7).

Examples

			20 = 4*5 is a term because with k=2, 5-k|20-k.
66 = 6*11 is a term (k=6), although when expressed as 66=22*3 no k exists.
110 = 10*11 = 22*5 is a term for two reasons, since with both of its odd prime factors it has the required property; 5-2|110-2 and 11-8|110-8. This is the smallest term having two distinct odd prime factors, both of which have the above property (see A309780, A309781).
		

Crossrefs

Programs

  • Mathematica
    kQ[n_, p_] := Module[{ans = False}, Do[If[Divisible[n - k, p - k], ans = True; Break[]], {k, 1, p - 2}]; ans]; aQ[n_] := EvenQ[n] && Length[(p = FactorInteger[ n][[2 ;; -1, 1]])] > 0 && AnyTrue[p, kQ[n, #] &]; Select[Range[252], aQ] (* Amiram Eldar, Aug 17 2019 *)
  • PARI
    getk(p, m) = {for (k=1, p-2, if (((m-k) % (p-k)) == 0, return(k)););}
    isok(m) = {if ((m % 2) == 0, my(f = factor(m)[,1]~); if (#f == 1, return (0)); for (i=2, #f, if (getk(f[i], m), return(1));););} \\ Michel Marcus, Aug 26 2019

A379144 a(n) is the number of iterations of the function x --> 2*x - 1 such that x remains prime, starting from A005382(n).

Original entry on oeis.org

2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 16 2024

Keywords

Comments

Cunningham chain of the second kind of length i is a sequence of prime numbers (p_1, ..., p_i) such that p_(r + 1) = 2*p_r - 1 for all 1 =< r < i. This sequence tells the length of the Cunningham chain of the second kind for primes from A005382.

Examples

			n = 1: A005382(1) = 2 --> 3 --> 5 --> 9, 9 is not a prime, thus a(1) = 2.
n = 3: A005382(3) = 7 --> 13 --> 25, 25 is not a prime, thus a(3) = 1.
		

Crossrefs

Programs

  • Mathematica
    s[n_] := -2 + Length[NestWhileList[2*# - 1 &, n, PrimeQ[#] &]]; Select[Array[s, 5000], # > 0 &] (* Amiram Eldar, Dec 16 2024 *)

Formula

a(A110581(n)) = 1.
a(A057326(n)) = 2.
Showing 1-4 of 4 results.