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 11-20 of 20 results.

A194593 Semiprimes s such that phi(s)/2 is prime.

Original entry on oeis.org

9, 10, 14, 22, 46, 94, 118, 166, 214, 334, 358, 454, 526, 694, 718, 766, 934, 958, 1006, 1126, 1174, 1438, 1678, 1726, 1774, 1966, 2038, 2374, 2566, 2614, 2638, 2734, 2878, 2974, 3046, 3238, 3646, 3814, 4054, 4078, 4126, 4198, 4414, 4894, 4918, 5158, 5638, 5758, 5806, 5926, 5998
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 30 2011

Keywords

Comments

For n > 2, A001221(a(n)) = A001221(A000010(a(n))) = 2, and A008683(a(n)) = A008683(A000010(a(n))) = 1. - Torlach Rush, Aug 23 2018
For n > 1, A000010(a(n)) = A077065(n-1). - Torlach Rush, Sep 11 2018

Crossrefs

Programs

  • Magma
    [9] cat [2*p: p in PrimesUpTo(3000) | IsPrime((p - 1) div 2)]; // Vincenzo Librandi, Aug 25 2018
  • Maple
    9, 10, op(select(s -> isprime(s/2) and isprime((s-2)/4), [seq(s,s=6..10000,8)])); # Robert Israel, Apr 06 2016
  • Mathematica
    Select[Range@ 6000, PrimeOmega@ # == 2 && PrimeQ[EulerPhi[#]/2] &] (* Michael De Vlieger, Apr 06 2016 *)
  • PARI
    isok(n) = (bigomega(n)== 2) && isprime(eulerphi(n)/2); \\ Michel Marcus, Apr 06 2016
    

Formula

a(n) = 2*A005385(n-1), n>1.
a(n) = 4*A005384(n-1) + 2, n > 1. - Michel Marcus, Apr 02 2020

Extensions

Corrected by R. J. Mathar, Oct 13 2011

A369139 Numbers k such that Omega(k) = 1 + Omega(k + 1).

Original entry on oeis.org

4, 6, 8, 10, 20, 22, 45, 46, 50, 58, 68, 76, 80, 82, 92, 104, 105, 106, 110, 114, 117, 152, 154, 165, 166, 178, 182, 186, 189, 212, 226, 236, 246, 258, 260, 261, 262, 266, 273, 286, 290, 315, 318, 322, 325, 333, 338, 342, 344, 345, 346, 354, 357, 358, 370, 382, 385, 402, 406, 410, 412, 424, 426
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Jan 14 2024

Keywords

Comments

Numbers k that have one more prime divisor (counted by multiplicity) than k + 1.

Examples

			a(3) = 8 is a term because 8 = 2^3 has 3 prime divisors (counted by multiplicity) and 8 + 1 = 9 = 3^2 has 2.
		

Crossrefs

Cf. A001222, A045920, A076156. Contains A077065.

Programs

  • Maple
    N:= 1000: # for terms <= N
    V:= map(numtheory:-bigomega, [$1..N+1]):
    select(t -> V[t] = 1 + V[t+1], [$1..N]);
  • Mathematica
    s = {}; Do[If[PrimeOmega[k] == 1 + PrimeOmega[k + 1], AppendTo[s, k]], {k, 500}]; s

A317510 Numbers (4p+1)/3 where p is a Sophie Germain prime p > 3.

Original entry on oeis.org

7, 15, 31, 39, 55, 71, 111, 119, 151, 175, 231, 239, 255, 311, 319, 335, 375, 391, 479, 559, 575, 591, 655, 679, 791, 855, 871, 879, 911, 959, 991, 1015, 1079, 1215, 1271, 1351, 1359, 1375, 1399, 1471, 1631, 1639, 1719, 1879, 1919, 1935, 1975, 1999, 2015, 2079, 2111, 2135, 2311, 2415, 2519, 2535, 2575, 2631
Offset: 1

Views

Author

Hilko Koning, Jul 30 2018

Keywords

Comments

It appears that this is a subsequence of A179882.
Define a set of consecutive positive odd numbers {1,......, (A077065(n)-1)} with n >= 3 and skip the number A077065(n)/2. Then the contraharmonic mean of that set gives the sequence. For example: ContraharmonicMean[{1, 3, 7, 9}] = 7, ContraharmonicMean[{1, 3, 5, 7, 9, 13, 15, 17, 19, 21}] = 15, ContraharmonicMean[{1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 27, 29, 31, 33, 35, 37,39, 41, 43, 45}] = 31. - Hilko Koning, Aug 28 2018
Let p be a Sophie Germain prime and define h = 2p + 1 a safe prime. Then the contraharmonic mean of the totatives of h is given by: CHM(h) = (Sum_{1 <= k < h, gcd(k, h) = 1} k^2) / (Sum_{1 <= k < h, gcd(k, h) = 1} k). Since h is prime, all integers k = 1, 2, ... , h - 1 are coprime to h. Then, CHM(h) = ((h - 1) * h * (2h-1) / 6) / ((h - 1) * h / 2). Thus CHM = (2h-1) / 3 = (4p+1) / 3. These values are integers precisely when p == 2 mod 3, which holds for all Sophie Germain primes, p >= 5. The resulting values for the sequence A317510, which is therefore a subsequence of A179882. - Hilko Koning, Jun 17 2025

Crossrefs

Subsequence of A004767, and of A004771.

Programs

  • GAP
    a:=[];; for p in [3..2000] do if IsPrime(p) and IsPrime(2*p+1) then Add(a,(4*p+1)/3); fi; od; a; # Muniru A Asiru, Aug 28 2018
  • Mathematica
    lst = {}; Do[If[PrimeQ[p] && PrimeQ[2 p + 1], AppendTo[lst, (4 p + 1)/3]], {p, 5, 2*10^3}]; lst
    4 (Select[Prime@Range[3, 300], PrimeQ[2 # + 1] &] + 1)/3 - 1 (* Robert G. Wilson v, Jul 30 2018 *)
  • PARI
    lista(nn) = {forprime (p=5, nn, if (isprime(2*p+1), print1((4*p+1)/3, ", ")););} \\ Michel Marcus, Aug 27 2018
    

A226540 Maximum of the proper divisors of the triangular numbers.

Original entry on oeis.org

1, 3, 5, 5, 7, 14, 18, 15, 11, 33, 39, 13, 35, 60, 68, 51, 57, 95, 105, 77, 23, 138, 150, 65, 117, 189, 203, 145, 155, 248, 264, 187, 119, 315, 333, 37, 247, 390, 410, 287, 301, 473, 495, 345, 47, 564, 588, 245, 425, 663, 689, 477, 495, 770, 798, 551, 59, 885
Offset: 2

Views

Author

Paolo P. Lava, Jun 10 2013

Keywords

Comments

Solutions of A226540(n)=n are listed in A005383(n).
Solutions of A226540(n)=n+1 are listed in A005385(n).

Examples

			For n = 28 we have n*(n+1)/2 = 406 and its proper divisors are 1, 2, 7, 14, 29, 58, 203. Hence a(28) = 203.
		

Crossrefs

Programs

  • Maple
    with(numtheory); A226540:=proc(q) local a,n;
    for n from 2 to q do a:=sort([op(divisors(n*(n+1)/2))]);
    print(a[nops(a)-1]); od; end: A226540(10^6);
  • Mathematica
    Table[Divisors[(n(n+1))/2][[-2]],{n,2,60}] (* Harvey P. Dale, Apr 09 2021 *)
  • PARI
    a(n)=if(n==2,return(1));my(p=factor(n/gcd(n,2))[1,1],q=factor((n+1)/gcd(n+1,2))[1,1]); binomial(n+1,2)/min(p,q) \\ Charles R Greathouse IV, Jun 10 2013

Formula

a(4n) = 4n^2 + n, 4n+1 <= a(4n+1) <= (8n^2 + 6n + 1)/3, 4n+3 <= a(4n+2) <= (8n^2 + 10n + 3)/3, a(4n+3) = 4n^2 + 7n + 3. - Charles R Greathouse IV, Jun 10 2013

A276983 Semiprimes n such that n-1 or n+1 is prime.

Original entry on oeis.org

4, 6, 10, 14, 22, 38, 46, 58, 62, 74, 82, 106, 158, 166, 178, 194, 226, 262, 278, 314, 346, 358, 382, 398, 422, 458, 466, 478, 502, 542, 562, 586, 614, 662, 674, 718, 734, 758, 838, 862, 878, 886, 982, 998, 1018, 1094, 1154, 1186, 1202, 1214, 1238, 1282, 1306, 1318, 1322
Offset: 1

Views

Author

Gary E. Davis, Sep 24 2016

Keywords

Comments

Union of A077065 and A077068.

Examples

			a(3) = 10 = 2*5 is a product of 2 primes and 10+1 = 11 is prime.
a(4) = 14 = 2*7 is a product of 2 primes and 14-1 = 13 is prime.
		

Crossrefs

Programs

  • Maple
    select(t -> isprime(t/2) and (isprime(t-1) or isprime(t+1)), [seq(i,i=2..10000,2)]); # Robert Israel, Sep 30 2016
  • Mathematica
    func[n_] := PrimeOmega[n] == 2 && (PrimeQ[n + 1] || PrimeQ[n - 1])
    Select[Range[1000], func[#] &]
  • PARI
    isok(n) = (bigomega(n)==2) && (isprime(n-1) || isprime(n+1)); \\ Michel Marcus, Sep 24 2016
    
  • PARI
    lista(nn) = forprime(p=2, nn, if(isprime(2*p+1) || isprime(2*p-1), print1(2*p, ", "))); \\ Altug Alkan, Sep 30 2016
    
  • Python
    from sympy import isprime, primerange
    def aupto(N): return [t for t in (2*p for p in primerange(2, N//2+1)) if isprime(t-1) or isprime(t+1)]
    print(aupto(1322)) # Michael S. Branicky, Aug 21 2022

Formula

a(n) = 2*A120628(n).

A343502 Numbers k such that tau(tau(k)) and tau(k+1) are both prime, where tau is the number of divisors function.

Original entry on oeis.org

2, 3, 4, 6, 8, 10, 15, 16, 22, 36, 46, 58, 82, 100, 106, 120, 166, 168, 178, 196, 210, 226, 256, 262, 270, 280, 312, 330, 346, 358, 378, 382, 408, 456, 462, 466, 478, 502, 520, 546, 562, 570, 586, 616, 640, 676, 690, 718, 728, 750, 760, 838, 858, 862, 886
Offset: 1

Views

Author

Claude H. R. Dequatre, Apr 17 2021

Keywords

Comments

Considering the first 10^8 positive integers there are 1439855 terms in the sequence and only the first two (2,3) are prime, all the others are composite numbers of which only three are odd (15, 65535 and 4194303).
Conjecture: all members except 2 and 3 are composite.
Open question: is there a finite number of odd terms in this sequence?

Examples

			16 is a term because tau(16) = 5 and tau(5) = 2 and tau(17) = 2 and 2 is prime.
23 is not a term because tau(23) = 2 and tau(2) = 2 and tau(24) = 8 and 2 is prime but not 8.
98 is not a term because tau(98) = 6 and tau(6) = 4 and tau(99) = 6 and 4 and 6 are not prime.
		

Crossrefs

Cf. A000005, A000040, A010553. Includes A077065.

Programs

  • Maple
    filter:= proc(n)
      isprime(numtheory:-tau(n+1)) and isprime(numtheory:-tau(numtheory:-tau(n)))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Feb 02 2025
  • Mathematica
    With[{t = DivisorSigma}, Select[Range[1000], And @@ PrimeQ[{t[0, t[0, #]], t[0, # + 1]}] &]] (* Amiram Eldar, May 27 2021 *)
  • PARI
    for(k=1,1e4,if(isprime(numdiv(numdiv(k))) && isprime(numdiv(k+1)),print1(k", ")))

A353172 a(n) is the least k > 1 such that Omega(n) = Omega(n mod k), where Omega = A001222.

Original entry on oeis.org

2, 3, 4, 5, 3, 7, 4, 9, 5, 6, 3, 13, 5, 5, 9, 17, 3, 10, 4, 12, 11, 6, 3, 25, 7, 10, 15, 10, 3, 11, 4, 33, 9, 5, 13, 20, 5, 8, 5, 24, 3, 15, 4, 9, 25, 6, 3, 49, 5, 14, 9, 11, 3, 19, 7, 20, 12, 6, 3, 22, 7, 7, 11, 65, 11, 18, 4, 10, 5, 25, 3, 40, 5, 5, 19, 16
Offset: 1

Views

Author

Thomas Scheuerle, Apr 28 2022

Keywords

Comments

It appears that a(m) = m*k/p if m = p*2^n ... . Are these formulas related to some well-known sequence of rational numbers?

Examples

			a(10) = 6 because 10 = 5*2 and 10 mod 6 = 4 = 2*2.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=2); while(bigomega(n) != bigomega(max(n%k,1)), k++); k
    
  • Python
    from itertools import count
    from sympy.ntheory.factor_ import primeomega
    def A353172(n):
        a = primeomega(n)
        for k in count(2):
            if (m := n % k) > 0 and primeomega(m) == a:
                return k # Chai Wah Wu, Jun 20 2022

Formula

a(A029744(n)) = A029744(n) + 1.
a(A003627(n)) = 3.
a(A000040(n)) = A095925(n).
a(A077065(n)) = 6. For n > 2.
If a(n) = 10, then n mod 10 is in most cases 8 and seldom 6.
a(m) = m*3/5 if m = 5*2^n or m = 15. This formula is valid for all positive n because (5*2^n) mod (5*2^n)*(3/5) = 2^(n+1). If the sequence of solutions does not create powers of two in the modulo operation, it will be of finite length. See next two formulas:
a(m) = m*3/11 if m = 11, 22, 33 or 66.
a(m) = m*4/43 if m = 43*2^n for n < 4. This series of solutions terminates because of the next formula which replaces the powers of two:
a(m) = m*41/(43*2^4) if m = 43*2^4*2^n. This formula is valid for all positive n.
a(m) = m*5/9 if m = 9*2^n or m = 27 or 45. This formula is valid for all positive n.
For each k = a(p) if k < p and gcd(k, p) = 1 such a formula, of the form a(m) = m*k/p, if m = p*2^n ..., can be developed.

A380101 Numbers k such that omega(k-th triangular number) = 2, where omega = A001221.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 9, 10, 13, 16, 17, 18, 22, 25, 26, 31, 37, 46, 49, 53, 58, 61, 73, 81, 82, 97, 106, 121, 127, 157, 162, 166, 178, 193, 226, 241, 242, 250, 256, 262, 277, 313, 337, 346, 358, 361, 382, 397, 421, 457, 466, 478, 486, 502, 541, 562, 577, 586, 613
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 12 2025

Keywords

Crossrefs

Supersequence of A077065 and of A178490.

Programs

  • Magma
    [k: k in [1..400] | #PrimeDivisors(k*(k+1) div 2) eq 2];
    
  • Maple
    filter:= proc(n) local W1, n1, W2; uses numtheory;
         if n::odd then nops(factorset(n)) = 1 and nops(factorset((n+1)/2)) = 1
         else nops(factorset(n/2)) = 1 and nops(factorset(n+1)) = 1
         fi
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Mar 12 2025
  • Mathematica
    Select[Range[600], PrimeNu[#*(#+1)/2] == 2 &] (* Amiram Eldar, Jan 12 2025 *)
  • PARI
    isok(k) = omega(k*(k+1)/2) == 2; \\ Michel Marcus, Jan 14 2025

A233973 a(n) = A232221(n)/4.

Original entry on oeis.org

0, 0, 1, 5, 9, 13, 32, 54, 82, 116, 159, 199, 227, 273, 331, 380, 429, 487, 536, 609, 679, 743, 816, 895, 953, 1008, 1042, 1067, 1104, 1180, 1253, 1332, 1429, 1532, 1626, 1675, 1733, 1812, 1921, 2045, 2169, 2317, 2420, 2535, 2656, 2756, 2850, 2953
Offset: 1

Views

Author

Omar E. Pol, Dec 18 2013

Keywords

Crossrefs

Formula

a(n) = (Sum_{i=1..n} (A077068(i)-A077065(i)))/4.

A385720 Numbers k >= 1 such that k/A000005(k) + (k+1)/A000005(k+1) is an integer.

Original entry on oeis.org

1, 5, 6, 8, 10, 13, 22, 37, 45, 46, 58, 61, 62, 69, 73, 74, 77, 82, 89, 106, 114, 117, 126, 146, 149, 150, 154, 157, 166, 167, 178, 186, 193, 197, 198, 206, 221, 226, 233, 237, 258, 261, 262, 263, 266, 277, 278, 279, 280, 290, 293, 306, 309, 311, 312, 313
Offset: 1

Views

Author

Ctibor O. Zizka, Jul 07 2025

Keywords

Comments

k/A000005(k) + (k+1)/A000005(k+1) = (3*k + 1)/4 for k >= 5 from A256072.
k/A000005(k) + (k+1)/A000005(k+1) = (3*k + 2)/4 for k >= 6 from A077065.
k/A000005(k) + (k+1)/A000005(k+1) =< (3*k + 2)/4 for k >= 5.

Examples

			For k = 6: 6/A000005(6) + 7/A000005(7) = 6/4 + 7/2 = 5, thus k = 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    Position[Plus @@@ Partition[Table[n/DivisorSigma[0, n], {n, 1, 320}], 2, 1], ?IntegerQ] // Flatten (* _Amiram Eldar, Jul 08 2025 *)
  • PARI
    isok(k) = denominator(k/numdiv(k) + (k+1)/numdiv(k+1)) == 1; \\ Michel Marcus, Jul 08 2025
    
  • Python
    from itertools import count, islice
    from sympy import divisor_count
    def A385720_gen(startvalue=1): # generator of terms >= startvalue
        m = max(startvalue,1)
        a, b = divisor_count(m), divisor_count(m+1)
        for k in count(m):
            if not (k*b+(k+1)*a)%(a*b):
                yield k
            a, b = b, divisor_count(k+2)
    A385720_list = list(islice(A385720_gen(),30)) # Chai Wah Wu, Jul 13 2025
Previous Showing 11-20 of 20 results.