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 31-40 of 40 results.

A158975 a(n) = sum of numbers k <= n such that all proper divisors of k are divisors of n.

Original entry on oeis.org

1, 3, 6, 10, 11, 21, 18, 30, 27, 32, 29, 68, 42, 60, 66, 70, 59, 96, 78, 120, 108, 104, 101, 180, 126, 131, 137, 155, 130, 229, 161, 221, 203, 199, 221, 281, 198, 240, 246, 321, 239, 335, 282, 360, 403, 332, 329, 488, 378, 418, 389, 419, 382, 500, 462, 557, 448
Offset: 1

Views

Author

Jaroslav Krizek, Apr 01 2009

Keywords

Comments

For primes p, a(p) = A158662(p) = A014284(A036234(p)).

Examples

			For n = 8 we have the following proper divisors of k <= n: {1}, {1}, {1}, {1, 2}, {1}, {1, 2, 3}, {1}, {1, 2, 4}. Only k = 6 has a proper divisor that is not a divisor of 8, viz. 3. Hence a(8) = 1 + 2 + 3 + 4 + 5 + 7 + 8 = 30.
		

Crossrefs

Cf. A000040, A158662, A014284, A036234, 158973.

Programs

  • Magma
    [ &+[ k: k in [1..n] | forall(t){ d: d in Divisors(k) | d eq k or d in Divisors(n) } ]: n in [1..57] ];

Extensions

Edited and extended by Klaus Brockhaus, Apr 06 2009

A225854 Frequency of prime numbers between consecutive partial sums of primes.

Original entry on oeis.org

1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 6, 8, 6, 9, 6, 9, 10, 10, 8, 12, 12, 11, 12, 12, 15, 14, 14, 14, 14, 17, 17, 16, 17, 19, 19, 22, 16, 24, 21, 20, 20, 20, 28, 22, 26, 21, 24, 28, 23, 31, 23, 30, 28, 28, 32, 28, 31, 30, 27, 36, 29, 32, 31, 39, 33, 38, 36, 36, 37
Offset: 1

Views

Author

Victor Phan, May 17 2013

Keywords

Comments

Gives the numbers of primes between adjacent numbers in the sequence A014284, that is, primes in the half-open interval [A014284(k), A014284(k+1)).
The plot of this sequence follows a linear curve.

Examples

			List the numbers with an increment of 1 beginning at n=1, and stop when the number of numbers reaches a prime, in this case the list would be {1,2} since its size is 2. Find the number of primes in that interval and add it to the sequence. In this case, there is 1 prime in the list. Continue counting from the last number in the previous list and apply the same rules, the next list will be {3,4,5} of size 3 and contains 2 prime numbers. The list after that will be {6,7,8,9,10} of size 5 and contains 1 prime number.
		

Crossrefs

Cf. A014284.

Programs

  • Mathematica
    numberOfLines = 100; (*How many elements desired in the sequence*) a = {0}; distribution = {}; last = 0; For[j = 1, j <= numberOfLines, j++, frequency = 0; b = {}; For[i = 1, i <= Prime[j], i++, b = Append[b, last + i]; If[PrimeQ[b[[i]]], frequency += 1];];last += Prime[j]; distribution = Append[distribution, frequency];]; Print["Distribution = ", distribution]; ListPlot[distribution]; (*original program*)
    seq[n_] := Block[{a=0, b=2, p=2, v}, Table[v = PrimePi@b-PrimePi@a; p = NextPrime@p; a = b; b += p; v, {n}]]; seq[100] (* faster version, Giovanni Resta, May 18 2013 *)

A264858 Integers k such that A007504(k) + 1 is a square.

Original entry on oeis.org

0, 17, 539, 652, 6420, 350857847
Offset: 1

Views

Author

Altug Alkan, Nov 26 2015

Keywords

Comments

Integers k such that the sum of the first k primes + 1 is a square.
Integers k such that A014284(k+1) is a square.
In A110996, it is commented that a(6) > 250000, if it exists.
a(6) > 50000000, if it exists. - Jon E. Schoenfield, Nov 29 2015

Examples

			a(2) = 17 because A007504(17) + 1 = 440 + 1 = 441 is a square.
		

Crossrefs

Programs

Extensions

a(6) from Jinyuan Wang, Aug 09 2023

A358223 Inverse Möbius transform of A181819, prime shadow function.

Original entry on oeis.org

1, 3, 3, 6, 3, 9, 3, 11, 6, 9, 3, 18, 3, 9, 9, 18, 3, 18, 3, 18, 9, 9, 3, 33, 6, 9, 11, 18, 3, 27, 3, 29, 9, 9, 9, 36, 3, 9, 9, 33, 3, 27, 3, 18, 18, 9, 3, 54, 6, 18, 9, 18, 3, 33, 9, 33, 9, 9, 3, 54, 3, 9, 18, 42, 9, 27, 3, 18, 9, 27, 3, 66, 3, 9, 18, 18, 9, 27, 3, 54, 18, 9, 3, 54, 9, 9, 9, 33, 3, 54
Offset: 1

Views

Author

Antti Karttunen, Nov 30 2022

Keywords

Comments

Multiplicative and dependent only on the prime signature (A046523) because also A181819 is.

Crossrefs

Programs

  • Mathematica
    f[n_] := f[n] = Times @@ Prime@ FactorInteger[n][[All, -1]]; Array[DivisorSum[#, f] - 1 &, 90] (* Michael De Vlieger, Nov 30 2022 *)
  • PARI
    A181819(n) = factorback(apply(e->prime(e),(factor(n)[,2])));
    A358223(n) = sumdiv(n,d,A181819(d));

Formula

a(n) = Sum_{d|n} A181819(d).
Multiplicative with a(p^e) = 1 + Sum_{k=1..e} prime(k) = A014284(e+1). - Amiram Eldar, Oct 23 2023

A364798 Triangular numbers that for some k >= 1 are also the sum of the first k noncomposite numbers (1 together with the primes).

Original entry on oeis.org

1, 3, 6, 78, 448516225, 448254714630193471
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 08 2023

Keywords

Comments

a(n) = A000217(i) = A014284(j) for appropriate i, j.

Examples

			78 is a term because 78 = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 = 1 + 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19.
		

Crossrefs

Intersection of A000217 and A014284.

Programs

  • Mathematica
    Select[Accumulate[Join[{1}, Prime[Range[10000]]]], IntegerQ[Sqrt[8 # + 1]] &]

Extensions

a(6) from Jinyuan Wang, Aug 09 2023

A366066 a(n) is the largest positive integer k such that n can be expressed as the sum of k distinct positive integers that are coprime to each other.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 2, 3, 3, 3, 4, 3, 4, 3, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9
Offset: 0

Views

Author

Yifan Xie, Sep 28 2023

Keywords

Comments

The indices at which k first appears, for k >= 0: 1, 3, 6, 11, 18, 29, 42, 59, 78 (A014284). Such n's are expressed as the sum of 1 and the first primes.
Runs with length >= 2 start at numbers k^2 - 1 (k >= 2).
If there are terms between runs of k and k+1, these two numbers occur alternately. Suppose that m is such a term that is b(m) terms after the first occurrence of k+1; if b(m) is odd, there are at least two even numbers in the expression of n as the sum of k+1 integers, which are not coprime to each other, so a(m) = k.

Examples

			For n = 11, 1+2+3+5=11; so a(11) = 4.
For n = 12, 1+4+7=12; so a(12) = 3.
		

Crossrefs

Programs

  • PARI
    lista(nn) = v=[0]; f=[7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79]; for(n=1, nn, for(i=1, prime(n), v=concat(v, n))); for(n=1, 15, v[f[n]+1]=v[f[n]+1]-1); v;

Formula

a(n) = A083375(n) - 1 if and only if n = 7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79; otherwise, a(n) = A083375(n).

A118483 Partial sums of primes that are not Chen primes (starting with 1).

Original entry on oeis.org

1, 44, 105, 178, 257, 354, 457, 608, 771, 944, 1137, 1360, 1589, 1830, 2101, 2378, 2661, 2974, 3305, 3654, 4021, 4394, 4777, 5174, 5595, 6028, 6467, 6924, 7387, 7910, 8457, 9050, 9651, 10258, 10871, 11490, 12133, 12794, 13467, 14158, 14867, 15594
Offset: 0

Views

Author

Jani Melik, May 05 2006

Keywords

Crossrefs

Programs

  • Maple
    ischenprime:=proc(n); if (isprime(n) = 'true') then if (isprime(n+2) = 'true' or numtheory[bigomega](n+2) = 2) then RETURN('true') else RETURN('false') fi fi end: ts_partsum_notchenprime:=proc(n) local i,ans,tren; ans:=1: tren:=1: for i from 1 to n do if (ischenprime(i)='false') then tren := tren+i: ans:=[op(ans), tren]: fi od; RETURN(ans) end: ts_partsum_notchenprime(1000);
  • Mathematica
    Accumulate[Join[{1},Select[Prime[Range[200]],PrimeOmega[#+2]>2&]]] (* Harvey P. Dale, Dec 14 2012 *)

A159074 Sum of the k in the range 1<=k<=n such that set of proper divisors of k is not a subset of the set of proper divisors of n.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 11, 7, 19, 24, 38, 11, 50, 46, 55, 67, 95, 76, 113, 91, 124, 150, 176, 121, 200, 221, 242, 252, 306, 237
Offset: 1

Views

Author

Jaroslav Krizek, Apr 04 2009

Keywords

Comments

The nomenclature of A159072 applies, where the terms in that sum are counted.

Examples

			a(8) = 7 adds k = 6, where {1, 2, 3} is not a subset of the divisor set {1, 2, 4} of n = 8, and k = 1, with an empty proper divisor set.
		

Crossrefs

Formula

a(n) = A158976(n) + 1.
If p = prime, a(p) = A000217(p) - A158662(p) + 1 = A000217(p) - A014284[A036234(p)] + 1.
a(n)+A159073(n)=A000217(n). - R. J. Mathar, Apr 06 2009

Extensions

Edited by R. J. Mathar, Apr 06 2009

A261033 Values of n such that A002110(n) - A007504(n) - 1 is a prime number.

Original entry on oeis.org

3, 5, 7, 9, 13
Offset: 1

Views

Author

Altug Alkan, Nov 18 2015

Keywords

Comments

Values of n such that difference between product of first n+1 terms of A008578 and sum of first n+1 terms of A008578 is a prime number.
Initial primes of the form A002110(n) - A007504(n) - 1 are 19, 2281, 510451.

Examples

			a(1) = 3 because (2*3*5) - (2+3+5) - 1 = 19 is prime.
a(2) = 5 because (2*3*5*7*11) - (2+3+5+7+11) - 1 = 2281 is prime.
a(3) = 7 because (2*3*5*7*11*13*17) - (2+3+5+7+11+13+17) - 1 = 510451 is prime.
		

Crossrefs

Programs

  • PARI
    for(n=1, 1e5, if(ispseudoprime(prod(k=1, n, prime(k)) - sum(k=1, n, prime(k)) - 1), print1(n, ", ")));

A383938 a(n) is the least positive integer k such that b(2*j) is prime for 1 <= j <= n but not prime for j = n+1, where b(1) = k and b(m+1) = b(m) + prime(m) for m >= 1.

Original entry on oeis.org

2, 5, 21, 129, 69, 1, 51, 23991, 171, 1371, 3, 322141431, 1431357020859
Offset: 0

Views

Author

Om S. M. Yadav, Aug 18 2025

Keywords

Comments

Similar to A227547, primes are added in successive manner except that here the sequence breaks if an even-indexed term is not prime and considers preceding even-indexed prime as the last term of the sequence. For example, a(2) = 21 [21, 23, 26, 31, 38, 49] but since 49 is not prime, last two terms (38 and 49) are omitted leaving 31 as last term in the sequence.
a(12) is the last term, because b(j) is always divisible by 11 for some j in {2, 4, 6, 8, 10, 14, 16, 18, 22, 24, 26}. - Pontus von Brömssen, Aug 19 2025

Examples

			a(n) = k, b(m+1) = b(m) + prime(m); b(1) = k
For n = 0, a(0) = 2; b(m+1) = b(m) + prime(m): [2]
For n = 1, a(1) = 5; b(m+1) = b(m) + prime(m): [5, 7(5+2)]
For n = 2, a(2) = 21; b(m+1) = b(m) + prime(m): [21, 23(21+2), 26(23+3), 31(26+5)]
For n = 3, a(3) = 129; b(m+1) = b(m) + prime(m): [129, 131(129+2), 134(131+3), 139(134+5), 146(139+7), 157(146+11)]
For n = 4, a(4) = 69; b(m+1) = b(m) + prime(m): [69, 71(69+2), 74(71+3), 79(74+5), 86(79+7), 97(86+11), 110(97+13), 127(110+17)]
For n = 5, a(5) = 1; b(m+1) = b(m) + prime(m): [1, 3(1+2), 6(3+3), 11(6+5), 18(11+7), 29(18+11), 42(29+13), 59(42+17), 78(59+19), 101(78+23)]
For a(n), even-indexed term is prime. e.g. for a(3) = 129 [129, 131, 134, 139, 146, 157], even indexed terms 131, 139, 157 are primes.
		

Crossrefs

Programs

  • PARI
    a(n) = my(vp=concat(2, vector(n+1, i, sum(k=1, 2*i+1, prime(k)))), v=concat(vector(n, i, 1), 0), k=1); while (apply(ispseudoprime, vector(n+1, i, vp[i]+k)) != v, k++); k; \\ Michel Marcus, Aug 19 2025

Extensions

a(11) from Michel Marcus, Aug 19 2025
a(12) from Pontus von Brömssen, Aug 19 2025
Previous Showing 31-40 of 40 results.