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 20 results. Next

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

Original entry on oeis.org

0, 0, 4, 20, 36, 52, 128, 216, 328, 464, 636, 796, 908, 1092, 1324, 1520, 1716, 1948, 2144, 2436, 2716, 2972, 3264, 3580, 3812, 4032, 4168, 4268, 4416, 4720, 5012, 5328, 5716, 6128, 6504, 6700, 6932, 7248, 7684, 8180, 8676, 9268, 9680, 10140, 10624, 11024, 11400
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2013, based on a posting by V.J. Pohjola to the Sequence Fans Mailing List, Nov 22 2013

Keywords

Comments

The sequence has wild fluctuations - see the successive plots in the links. This is typical behavior for a particle whose movement is governed by an arc-sine law (cf. Feller, Chap. III). - N. J. A. Sloane, Nov 23 2013
Negative stretches: terms 941-1031 and 13197-1431205. - Hans Havermann, Nov 23 2013
After reaching a local maximum of 21957005755012 at term 24118371, the sequence again descends with the first negative of a third such stretch at term 32437583. - Hans Havermann, Nov 28 2013
All terms are multiples of 4, cf. A008586. - Reinhard Zumkeller, Nov 22 2013
See A232361 and A232359 for peak values and where they occur: max{a(A232359(n)-1), a(A232359(n)+1)} < a(A232359(n)) = A232361(n). - Reinhard Zumkeller, Nov 24 2013

References

  • W. Feller, An Introduction to Probability Theory and its Applications, 3rd ed, Wiley, New York, 1968.

Crossrefs

Partial sums of A232342.

Programs

  • Haskell
    a232221 n = a232221_list !! (n-1)
    a232221_list = scanl1 (+) a232342_list
    -- Reinhard Zumkeller, Dec 16 2013, Nov 22 2013

A232342 A077068(n) minus A077065(n).

Original entry on oeis.org

0, 0, 4, 16, 16, 16, 76, 88, 112, 136, 172, 160, 112, 184, 232, 196, 196, 232, 196, 292, 280, 256, 292, 316, 232, 220, 136, 100, 148, 304, 292, 316, 388, 412, 376, 196, 232, 316, 436, 496, 496, 592, 412, 460, 484, 400, 376, 412, 556, 736, 1000, 940, 1012
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 16 2013

Keywords

Comments

All terms are multiples of 4, cf. A008586;
a(n) = A077068(n) - A077065(n).
First term < 0: a(426) = -104.

Crossrefs

Cf. A232221 (partial sums).

Programs

  • Haskell
    a232342 n = a232342_list !! (n-1)
    a232342_list = zipWith (-) a077068_list a077065_list

A179882 a(n) is the corresponding value of contraharmonic mean B(h) of numbers k such that gcd(k, h) = 1 (k < h) for numbers h from A179877(n) and A179878(n).

Original entry on oeis.org

1, 7, 15, 31, 39, 55, 71, 111, 119, 151, 175, 177, 231, 239, 255, 303, 311, 313, 319, 329, 335, 337, 345, 375, 391, 393, 479, 521, 559, 575, 591, 593, 601, 607, 623, 655, 657, 679, 777, 785, 791, 823, 855, 863, 871, 879, 889, 905, 911, 929, 937, 959, 961, 991
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Comments

Subsequence of A179873 and A179874.
It appears that for n >= 3, (4*A005384(n)+1)/3 is a subsequence. - Hilko Koning, Jul 27 2018
This happens for this subsequence of A179877: 10, 22, 46, 58, 82, 106, 166, 178, ... apparently "Semiprimes of form prime - 1" >= 10 (see A077065). - Michel Marcus, Jul 27 2018

Crossrefs

Programs

  • Mathematica
    {1}~Join~Select[Partition[Table[ContraharmonicMean@ Select[Range[n - 1], GCD[#, n] == 1 &], {n, 2, 1500}], 2, 1], And[IntegerQ@ First@ #, SameQ @@ #] &][[All, 1]] (* Michael De Vlieger, Jul 30 2018 *)
  • PARI
    lista(nn) = {vch = vector(nn, k, ch(k)); for (i=1, nn-1, if ((vch[i] == vch[i+1]) && !frac(vch[i]), print1(vch[i], ", ")););} \\ Michel Marcus, Jul 27 2018

Formula

a(n) = A175505(A179877(n)) / A175506(A179877(n)).
a(n) = A175505(A179878(n)) / A175506(A179878(n)).

Extensions

More terms from Michel Marcus, Jul 27 2018

A164977 Numbers m such that the set {1..m} has only one nontrivial decomposition into subsets with equal element sum.

Original entry on oeis.org

3, 4, 5, 6, 10, 13, 22, 37, 46, 58, 61, 73, 82, 106, 157, 166, 178, 193, 226, 262, 277, 313, 346, 358, 382, 397, 421, 457, 466, 478, 502, 541, 562, 586, 613, 661, 673, 718, 733, 757, 838, 862, 877, 886, 982, 997, 1018, 1093, 1153, 1186, 1201, 1213, 1237, 1282
Offset: 1

Views

Author

Alois P. Heinz, Sep 03 2009

Keywords

Comments

Numbers m such that the triangular number T(m) = m*(m+1)/2 has exactly two divisors >= m.
Also numbers m such that m*(m+1)/2 is the product of two primes.
Contains all numbers in A005383. - Harry Richman, Jan 09 2025
Contains all numbers in A077065. - Alois P. Heinz, Jan 19 2025

Examples

			10 is in the sequence, because there is only one nontrivial decomposition of {1..10} into subsets with equal element sum: {1,10}, {2,9}, {3,8}, {4,7}, {5,6}; 11|55.
13 is in the sequence with decomposition of {1..13}: {1,12}, {2,11}, {3,10}, {4,9}, {5,8}, {6,7}, {13}; 13|91.
		

Crossrefs

Cf. A005383, A077065 (distinct subsequences).

Programs

  • Maple
    a:= proc(n) option remember; local k;
          for k from 1+ `if`(n=1, 2, a(n-1))
          while not (andmap(isprime, [k, (k+1)/2]) or
                     andmap(isprime, [k+1, k/2]))
          do od; k
        end:
    seq(a(n), n=1..100);
  • Mathematica
    Select[Range@1304, PrimeOmega[#] + PrimeOmega[# + 1] == 3 &] (* Robert G. Wilson v, Jun 28 2010 and updated Sep 21 2018 *)
  • PARI
    is(n)=if(isprime(n),bigomega(n+1)==2, isprime(n+1) && bigomega(n)==2) \\ Charles R Greathouse IV, Sep 08 2015
    
  • PARI
    is(n)=if(n%2, isprime((n+1)/2) && isprime(n), isprime(n/2) && isprime(n+1)) \\ Charles R Greathouse IV, Mar 16 2022
    
  • PARI
    list(lim)=my(v=List()); forprime(p=3,lim, if(isprime((p+1)/2), listput(v,p))); forprime(p=5,lim+1, if(isprime(p\2), listput(v,p-1))); Set(v) \\ Charles R Greathouse IV, Mar 16 2022

Formula

{ m : A035470(m) = 2 }.
{ m : A164978(m) = 2 }.
{ m : |{d|m*(m+1)/2 : d>=m}| = 2 }.
{ m : m*(m+1)/2 in {A068443} }.
{ m : m*(m+1)/2 in {A001358} }.
{ m : A069904(m) = 2 }.
{ m : A001222(n) + A001222(n+1) = 3 }. - Alois P. Heinz, Jan 08 2022
{ A005383 } union { A077065 }. - Alois P. Heinz, Jan 19 2025

A077068 Semiprimes of the form prime + 1.

Original entry on oeis.org

4, 6, 14, 38, 62, 74, 158, 194, 278, 314, 398, 422, 458, 542, 614, 662, 674, 734, 758, 878, 998, 1094, 1154, 1202, 1214, 1238, 1322, 1382, 1454, 1622, 1658, 1754, 1874, 1934, 1994, 2018, 2138, 2342, 2474, 2558, 2594, 2798, 2858, 2918, 3062, 3218, 3254
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 23 2002

Keywords

Comments

a(n) = A005383(n)+1 = 2*A005382(n).
There are 672 semiprimes of form prime+1 below 100000.
a(n) = A232342(n) + A077065(n). - Reinhard Zumkeller, Dec 16 2013

Examples

			A001358(25)=74=2*37 is a term as 74=A000040(21)+1=73+1.
		

Crossrefs

Programs

Formula

A010051(A008864(n)/2) = A064911(A008864(n)) = 1. - Reinhard Zumkeller, Nov 22 2013

A109287 4-almost primes equal to p*q + 1, where p and q are (not necessarily distinct) primes.

Original entry on oeis.org

16, 36, 40, 56, 88, 135, 156, 184, 204, 210, 220, 248, 250, 260, 296, 306, 315, 328, 330, 340, 342, 372, 414, 459, 472, 490, 516, 536, 546, 580, 584, 636, 650, 686, 690, 708, 714, 732, 735, 738, 804, 808, 819, 836, 850, 852, 870, 872, 940, 950, 966, 975, 996
Offset: 1

Views

Author

Keywords

Comments

4-almost primes of the form semiprime + 1.

Examples

			a(1) = 16 because (3*5+1)=(2^4) = 16.
a(2) = 36 because (5*7+1)=((2^2)*(3^2)) = 36.
a(3) = 40 because (3*13+1)=((2^3)*5) = 40.
a(4) = 56 because (5*11+1)=((2^3)*7) = 56.
a(5) = 88 because (3*29+1)=((2^3)*11) = 88.
a(6) = 135 because (2*67+1)=((3^3)*5) = 135.
a(7) = 156 because (5*31+1)=((2^2)*3*13) = 156.
a(8) = 184 because (3*61+1)=((2^3)*23) = 184.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358. 4-almost primes are in A014613.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in A109373.
3-almost primes of the form semiprime + 1 are in A109067.
4-almost primes of the form semiprime + 1 are in this sequence.
5-almost primes of the form semiprime + 1 are in A109383.
Least n-almost prime of the form semiprime + 1 are in A128665.
Similar to A076153; after A076153(0)=3 next difference is A076153(100)=1792 whereas A109287(100)=1794.

Programs

  • Mathematica
    bo[n_] := Plus @@ Last /@ FactorInteger[n]; Select[Range[1000], bo[ # ] == 4 && bo[ # - 1] == 2 &] (* Ray Chandler, Aug 27 2005 *)
  • PARI
    is(n)=bigomega(n)==4 && bigomega(n-1)==2 \\ Charles R Greathouse IV, Sep 16 2015

Formula

a(n) is in this sequence iff a(n) is in A014613 and (a(n)-1) is in A001358.

Extensions

Extended by Ray Chandler, Aug 27 2005
Edited by Ray Chandler, Mar 20 2007

A109373 Semiprimes of the form semiprime + 1.

Original entry on oeis.org

10, 15, 22, 26, 34, 35, 39, 58, 86, 87, 94, 95, 119, 122, 123, 134, 142, 143, 146, 159, 178, 202, 203, 206, 214, 215, 218, 219, 254, 299, 302, 303, 327, 335, 362, 382, 394, 395, 446, 447, 454, 482, 502, 515, 527, 538, 543, 554, 566, 623, 634, 635, 695, 698
Offset: 1

Views

Author

Jonathan Vos Post, Aug 24 2005

Keywords

Examples

			a(1) = 10 because (3*3+1)=(2*5) = 10.
a(2) = 15 because (2*7+1)=(3*5) = 15.
a(3) = 22 because (3*7+1)=(2*11) = 22.
a(4) = 26 because (5*5+1)=(2*13) = 26.
a(5) = 34 because (3*11+1)=(2*17) = 34.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in this sequence.
3-almost primes of the form semiprime + 1 are in A109067.
4-almost primes of the form semiprime + 1 are in A109287.
5-almost primes of the form semiprime + 1 are in A109383.
Least n-almost prime of the form semiprime + 1 are in A128665.
Subsequence of A088707; A064911.

Programs

  • Haskell
    a109373 n = a109373_list !! (n-1)
    a109373_list = filter ((== 1) . a064911) a088707_list
    -- Reinhard Zumkeller, Feb 20 2012
    
  • Mathematica
    fQ[n_] := Plus @@ Last /@ FactorInteger[n] == 2; Select[ Range[ 700], fQ[ # - 1] && fQ[ # ] &] (* Robert G. Wilson v *)
    With[{sps=Select[Range[700],PrimeOmega[#]==2&]},Transpose[Select[ Partition[ sps,2,1],#[[2]]-#[[1]]==1&]][[2]]] (* Harvey P. Dale, Sep 05 2012 *)
  • PARI
    is(n)=bigomega(n)==2 && bigomega(n-1)==2 \\ Charles R Greathouse IV, Jan 31 2017

Formula

a(n) is in this sequence iff a(n) is in A001358 and (a(n)-1) is in A001358.
a(n) = A070552(n) + 1.

Extensions

Extended by Ray Chandler and Robert G. Wilson v, Aug 25 2005
Edited by Ray Chandler, Mar 20 2007

A350593 Numbers k such that tau(k) + tau(k+1) = 6, where tau is the number of divisors function A000005.

Original entry on oeis.org

5, 6, 7, 10, 13, 22, 37, 46, 58, 61, 73, 82, 106, 157, 166, 178, 193, 226, 262, 277, 313, 346, 358, 382, 397, 421, 457, 466, 478, 502, 541, 562, 586, 613, 661, 673, 718, 733, 757, 838, 862, 877, 886, 982, 997, 1018, 1093, 1153, 1186, 1201, 1213, 1237, 1282
Offset: 1

Views

Author

Jon E. Schoenfield, Jan 08 2022

Keywords

Comments

Since tau(k) + tau(k+1) = 6, (tau(k), tau(k+1)) must be (1,5), (2,4), (3,3), (4,2), or (5,1); of these, (1,5) and (5,1) are impossible (tau(m) = 1 only for m=1, but then neither m+1 nor m-1 would have 5 divisors), and (3,3) is also impossible (both k and k+1 would have to be squares of primes), so (tau(k), tau(k+1)) must be either (2,4) or (4,2).
For every prime p, tau(p) = 2. For every semiprime s, tau(s) = 4, with the exception of the squares of primes; for p prime, tau(p^2) = 3, since the divisors of p^2 are 1, p, and p^2.
The only numbers that have exactly 4 divisors but are not semiprimes are the cubes of primes; for prime p, the divisors of p^3 are 1, p, p^2, and p^3.
As a result, this sequence consists of:
(1) the primes p such that (p+1)/2 is prime (A005383), with the exception of p=3 (since p+1 = 4 has 3 divisors, not 4),
(2) semiprimes of the form prime - 1 (A077065), with the exception of the semiprime 4 (since it does not have 4 divisors), and
(3) the special case k = 7, since it is the unique prime p such that p+1 has 4 divisors but is not a semiprime.
For all k > 4, tau(k) + tau(k+1) >= 6; for k = 1..4, tau(k) + tau(k+1) = 3, 4, 5, 5.

Examples

			   k  tau(k)  tau(k+1)  tau(k) + tau(k+1)
  --  ------  --------  -----------------
   1     1        2         1 + 2 = 3
   2     2        2         2 + 2 = 4
   3     2        3         2 + 3 = 5
   4     3        2         3 + 2 = 5
   5     2        4         2 + 4 = 6   so   5 = a(1)
   6     4        2         4 + 2 = 6   so   6 = a(2)
   7     2        4         2 + 4 = 6   so   7 = a(3)
   8     4        3         4 + 3 = 7
   9     3        4         3 + 4 = 7
  10     4        2         4 + 2 = 6   so  10 = a(4)
  11     2        6         2 + 6 = 8
  12     6        2         6 + 2 = 8
  13     2        4         2 + 4 = 6   so  13 = a(5)
		

Crossrefs

Numbers k such that Sum_{j=0..N-1} tau(k+j) = 2*Sum_{k=1..N} tau(k): A000040 (N=1), (this sequence) (N=2), A350675 (N=3), A350686 (N=4), A350699 (N=5), A350769 (N=6), A350773 (N=7), A350854 (N=8).

Programs

  • Mathematica
    Select[Range[1300], Plus @@ DivisorSigma[0, # + {0, 1}] == 6 &] (* Amiram Eldar, Jan 08 2022 *)
    Position[Total/@Partition[DivisorSigma[0,Range[1300]],2,1],6]//Flatten (* Harvey P. Dale, Sep 03 2022 *)
  • PARI
    isok(k) = numdiv(k) + numdiv(k+1) == 6; \\ Michel Marcus, Jan 08 2022
    
  • Python
    from itertools import count, islice
    from sympy import divisor_count
    def A350093_gen(): # generator of terms
        a, b = divisor_count(1), divisor_count(2)
        for k in count(1):
            if a + b == 6:
                yield k
            a, b = b, divisor_count(k+2)
    A350093_list = list(islice(A350093_gen(),12)) # Chai Wah Wu, Jan 11 2022

Formula

{ k : tau(k) + tau(k+1) = 6 }.
UNION(A005383 \ {3}, A077065 \ {4}, {7}).
a(n) = A164977(n+1) for n>=4. - Hugo Pfoertner, Jan 08 2022

A109067 3-almost primes of the form semiprime + 1.

Original entry on oeis.org

27, 50, 52, 63, 66, 70, 75, 78, 92, 116, 124, 130, 147, 170, 186, 188, 195, 207, 222, 236, 238, 255, 266, 268, 275, 279, 290, 292, 310, 322, 356, 363, 366, 387, 399, 404, 412, 418, 423, 428, 438, 452, 455, 470, 474, 483, 494, 498, 506, 518, 530, 534, 539, 555
Offset: 1

Views

Author

Jonathan Vos Post, Aug 24 2005

Keywords

Examples

			a(1) = 27 because (2*13+1)=(3^3) = 27.
a(2) = 50 because (7*7+1)=(2*5^2) = 50.
a(3) = 52 because (3*17+1)=(2^2*13) = 52.
a(4) = 63 because (2*31+1)=(3^2*7) = 63.
a(5) = 66 because (5*13+1)=(2*3*11) = 66.
a(6) = 70 because (3*23+1)=(2*5*7) = 70.
a(7) = 75 because (2*37+1)=(3*5^2) = 75.
a(8) = 78 because (7*11+1)=(2*3*13) = 78.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358. 3-almost primes are in A014612.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in A109373.
3-almost primes of the form semiprime + 1 are in this sequence.
4-almost primes of the form semiprime + 1 are in A109287.
5-almost primes of the form semiprime + 1 are in A109383.
Least n-almost prime of the form semiprime + 1 are in A128665.

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger[n];Select[Range[600], f[ # ] == 3 && f[ # - 1] == 2 &] (* Ray Chandler, Mar 20 2007 *)
    Select[Select[Range[600],PrimeOmega[#]==2&]+1,PrimeOmega[#]==3&] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    list(lim)=my(v=List(),t); forprime(p=2,lim, forprime(q=2,min(p,lim\p), if(bigomega(t=p*q+1)==3, listput(v,t)))); Set(v) \\ Charles R Greathouse IV, Feb 01 2017

Formula

a(n) is in this sequence iff a(n) is in A014612 and a(n)-1 is in A001358.

Extensions

Edited and extended by Ray Chandler, Mar 20 2007

A109383 5-almost primes of the form semiprime + 1.

Original entry on oeis.org

112, 120, 162, 300, 304, 378, 392, 396, 408, 520, 552, 567, 592, 612, 630, 656, 675, 680, 688, 696, 700, 750, 780, 918, 924, 944, 952, 980, 990, 1044, 1100, 1116, 1136, 1140, 1160, 1168, 1170, 1242, 1264, 1272, 1300, 1323, 1352, 1372, 1380, 1386, 1416, 1470
Offset: 1

Views

Author

Jonathan Vos Post, Aug 25 2005

Keywords

Examples

			a(1) = 112 because (3*37)+1 = (2^4) * 7 = 112.
a(2) = 120 because (7*17)+1 = (2^3) * 3 * 5 = 120.
a(3) = 162 because (7*23)+1 = 2 * (3^4) = 162.
		

Crossrefs

Primes are in A000040. Semiprimes are in A001358. 5-almost primes are in A014614.
Primes of the form semiprime + 1 are in A005385 (safe primes).
Semiprimes of the form semiprime + 1 are in A109373.
3-almost primes of the form semiprime + 1 are in A109067.
4-almost primes of the form semiprime + 1 are in A109287.
5-almost primes of the form semiprime + 1 are in this sequence.
Least n-almost prime of the form semiprime + 1 are in A128665.

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger[n];Select[Range[1500], f[ # ] == 5 && f[ # - 1] == 2 &] (* Ray Chandler, Mar 20 2007 *)
  • PARI
    v=vector(10000);i=0; for(n=1,9e99, if(issemi(n)&bigomega(n+1)==5, v[i++]=n+1;if(i==#v, return))); v \\ Charles R Greathouse IV, Feb 14 2011

Formula

a(n) is in this sequence iff a(n) is in A014614 and (a(n)-1) is in A001358.

Extensions

Extended by Ray Chandler, Mar 20 2007
Showing 1-10 of 20 results. Next