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.

User: Paolo P. Lava

Paolo P. Lava's wiki page.

Paolo P. Lava has authored 1629 sequences. Here are the ten most recent ones:

A387198 Smallest integer that can be expressed as the sum of k different primes, for all k’s between 2 and n, with n >= 2.

Original entry on oeis.org

2, 5, 10, 21, 28, 45, 58, 81, 106, 129, 166, 201, 238, 285, 338, 399, 440, 511, 572, 645, 718, 811, 888, 985, 1064, 1173, 1268, 1383, 1484, 1611, 1730, 1869, 1988, 2139, 2276, 2439, 2594, 2769, 2924, 3111, 3266, 3459, 3638, 3835, 4028, 4245, 4454, 4665, 4888, 5121, 5356
Offset: 1

Author

Paolo P. Lava, Aug 21 2025

Keywords

Comments

Lower bounds are listed in A007504.

Examples

			a(2) = 5 because 5 = 2 + 3;
a(3) = 10 because 10 = 3 + 7 = 2 + 3 + 5;
a(4) = 21 because 21 = 2 + 19 = 3 + 5 + 13 = 2 + 3 + 5 + 11;
a(5) = 28 because 28 = 5 + 23 = 2 + 7 + 19 = 3 + 5 + 7 + 13 = 2 + 3 + 5 + 7 + 11; etc.
		

Crossrefs

Extensions

a(22) and more terms from David A. Corneth, Aug 21 2025
a(1) prepended by David A. Corneth, Aug 26 2025

A386935 Integers with the same arithmetic mean for divisors and anti-divisors.

Original entry on oeis.org

3, 15, 135, 376, 6956, 1913646, 1838558856
Offset: 1

Author

Paolo P. Lava, Aug 09 2025

Keywords

Comments

For the listed numbers the arithmetic means are 2, 6, 30, 90, 1064, 97128, 143824680, ...
a(8) > 10^10, if it exists. - Amiram Eldar, Aug 12 2025

Examples

			Divisors of 135 are 8: 1, 3, 5, 9, 15, 27, 45, 135. Their sum is 240 and 240/8 = 30.
Anti-divisors of 135 are 7: 2, 6, 10, 18, 30, 54, 90. Their sum is 210 and 210/7 = 30.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a, b, k, n, v; v:=[];
    for n from 3 to q do k:=2; a:=0; b:=0;
    for k from 2 to n-1 do if abs((n mod k)-k/2)<1 then b:=b+1; a:=a+k; fi; od;
    if sigma(n)/tau(n)=a/b then v:=[op(v), n]; fi; od; op(v); end: P(10^4);
  • Python
    from itertools import count, islice
    from sympy.ntheory.factor_ import divisor_sigma, antidivisors
    def A386935_gen(startvalue=3): # generator of terms >= startvalue
        for k in count(max(startvalue,3)):
            if divisor_sigma(k)*len(d:=antidivisors(k))==divisor_sigma(k,0)*sum(d):
                yield k
    A386935_list = list(islice(A386935_gen(),5)) # Chai Wah Wu, Aug 12 2025

Extensions

a(6) from Michel Marcus, Aug 09 2025
a(7) from Amiram Eldar, Aug 10 2025

A385490 Least integer k such that the sum of its anti-divisors is equal to k - n.

Original entry on oeis.org

5, 1, 2, 261, 34, 29, 194, 7611, 216, 51, 1164, 1251, 1044, 239, 236, 69, 226, 749, 64, 1079, 156, 79, 114, 219, 2546, 89, 254, 879, 106, 541, 344, 1619, 96, 531, 454, 991, 293606, 10879, 134, 141, 1006, 491, 146, 509, 1214, 639, 366, 13649, 35856, 17081, 726
Offset: 0

Author

Paolo P. Lava, Jun 30 2025

Keywords

Examples

			a(0) = 5: anti-divisors are 2, 3 and 5 - (2 + 3) = 0;
a(1) = 1: no anti-divisors and 1 - 0 = 1;
a(2) = 2: no anti-divisors and 2 - 0 = 2;
a(3) = 261: anti-divisors are 2, 6, 18, 58, 174 and 261 - (2 + 6 + 18 + 58 + 174) = 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,j,k,n,v; v:=array(1..h);
    for k from 1 to h do v[k]:=0; od; v[2]:=1; v[3]:=2;
    for n from 3 to q do k:=0; j:=n; while j mod 2<>1 do
    k:=k+1; j:=j/2; od; a:=sigma(2*n+1)+sigma(2*n-1)+sigma(n/2^k)*2^(k+1)-6*n-2;
    if n>=a then b:=n-a+1; if b<=h then if v[b]=0 then v[b]:=n; fi; fi; fi; od; op(v); end:
    P(293606,51);

A385451 Least integer k such that the sum of its anti-divisors is equal to k + n.

Original entry on oeis.org

5, 11, 14, 7, 10, 71, 13, 101, 48, 129, 18, 17, 46, 37, 22, 27, 62, 35, 28, 55, 66, 3279, 92, 49, 42, 155, 32, 1721, 154, 81, 50, 59, 38, 229, 152, 53, 222, 859, 58, 393, 190, 45, 52, 73, 68, 97, 104, 60, 128, 63, 72, 87, 436, 401, 136, 673, 142, 429, 272, 163
Offset: 0

Author

Paolo P. Lava, Jun 29 2025

Keywords

Examples

			a(0) = 5: anti-divisors are 2, 3 and 2 + 3 - 5 = 0;
a(1) = 11: anti-divisors are 2, 3, 7 and 2 + 3 + 7 - 11 = 1;
a(2) = 14: anti-divisors are 3, 4, 9 and 3 + 4 + 9 - 14 = 2;
a(3) = 7: anti-divisors are 2, 3, 5 and 2 + 3 + 5 - 7 = 3.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,j,k,n,v; v:=array(1..h);
    for k from 1 to h do v[k]:=0; od; for n from 1 to q do k:=0; j:=n; while j mod 2<>1 do
    k:=k+1; j:=j/2; od; a:=sigma(2*n+1)+sigma(2*n-1)+sigma(n/2^k)*2^(k+1)-6*n-2;
    if a>=n then b:=a-n+1; if b<=h then if v[b]=0 then v[b]:=n; fi; fi; fi; od; op(v); end:
    P(3300,60);

A383230 Numbers k whose decimal representation can be split in three parts which can be used as seeds for a tribonacci-like sequence containing k itself.

Original entry on oeis.org

197, 742, 1007, 1257, 1484, 1749, 1789, 3241, 4349, 4515, 4851, 5709, 6482, 6925, 7756, 8196, 8449, 8698, 10232, 10997, 11627, 16898, 17206, 18353, 19789, 20464, 27315, 30696, 31385, 35537, 40928, 43367, 44111, 48310, 48591, 49228, 50574, 58506, 62770, 79976, 88222
Offset: 1

Author

Paolo P. Lava, Apr 20 2025

Keywords

Comments

There are 306 terms < 10^8.
If the number k is rewritten as the concatenation of a, b and c, the problem is to find an integer x such that k = a*A000073(x) + b*A001590(x+1) + c*A000073(x+1).
Is there any term that results from more than one concatenation?

Examples

			1007 can be split into 10, 0, 7 and the tribonacci-like sequence contains 1007 itself: 10, 0, 7, 17, 24, 48, 89, 161, 298, 548, 1007 ... (x = 9, as per second comment);
1257 can be split into 1, 25, 7 and the tribonacci-like sequence contains 1257 itself: 1, 25, 7, 33, 65, 105, 203, 373, 681, 1257 ... (x = 8, as per second comment);
16898 can be split into 16, 8, 98 and the tribonacci-like sequence contains 16898 itself: 16, 8, 98, 122, 228, 448, 798, 1474, 2720, 4992, 9186, 16898 ... (x = 10, as per second comment).
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local b,c,d,f1,f2,f3,i,j,m,n,t,v,y,x,w; i:=[]; for n from 100 to q do b:=length(n);
    for t from 1 to b-2 do c:=n mod 10^t; m:=trunc(n/10^t); d:=length(m);
    for j from 1 to d-1 do x:=trunc(m/10^j); y:=m mod 10^j; f1:=2; f2:=3; f3:=4; v:=x*f1+y*f2+c*f3;
    while v
    				

A382700 First member of the least set of 5 consecutive primes such that the sum of each pair of consecutive primes in this set is a multiple of n.

Original entry on oeis.org

2, 3, 5, 47, 3593, 5, 10487, 523, 38377, 3593, 1796671, 409, 947423, 10487, 60383, 62501, 18164651, 38377, 15095579, 32633, 3272567, 1796671, 116863451, 67819, 65835479, 947423, 7005239, 1165217, 1154953243, 60383, 800037461, 7442557, 15442121, 18164651, 771405431
Offset: 1

Author

Paolo P. Lava, Apr 04 2025

Keywords

Examples

			a(4) = 47. The least 5 consecutive primes are 47, 53, 59, 61, 67:
  47 + 53 = 100 and 100/4 = 25;
  53 + 59 = 112 and 112/4 = 28;
  59 + 61 = 120 and 120/4 = 30;
  61 + 67 = 128 and 128/4 = 32.
a(27) = 7005239. The least 5 consecutive primes are 7005239, 7005277, 7005293, 7005331, 7005347:
  7005239 + 7005277 = 14010516 and 14010516/27 = 518908;
  7005277 + 7005293 = 14010570 and 14010570/27 = 518910;
  7005293 + 7005331 = 14010624 and 14010624/27 = 518912;
  7005331 + 7005347 = 14010678 and 14010678/27 = 518914.
		

Crossrefs

Cf. A254862 (2 consecutive), A382698 (3 consecutive), A382699 (4 consecutive).

A382699 First member of the least set of 4 consecutive primes such that the sum of each pair of consecutive primes in this set is a multiple of n.

Original entry on oeis.org

2, 3, 5, 23, 157, 5, 977, 53, 5171, 157, 33871, 137, 159293, 977, 2969, 541, 406873, 5171, 471313, 6047, 166739, 33871, 2112193, 5309, 520763, 159293, 207869, 5443, 2404471, 2969, 1531487, 88919, 2673791, 406873, 6056569, 95737, 8480357, 471313, 561829, 73477
Offset: 1

Author

Paolo P. Lava, Apr 04 2025

Keywords

Examples

			a(4) = 23. The least 4 consecutive primes are 23, 29, 31, 37:
  23 + 29 = 52 and 52/4 = 13;
  29 + 31 = 60 and 60/4 = 15;
  31 + 37 = 68 and 68/4 = 17.
a(37) = 8480357. The least 4 consecutive primes are 8480357, 8480369, 8480431, 8480443:
  8480357 + 8480369 = 16960726 and 16960726/37 = 458398;
  8480369 + 8480431 = 16960800 and 16960800/37 = 458400;
  8480431 + 8480443 = 16960874 and 16960874/37 = 458402.
		

Crossrefs

Cf. A254862 (2 consecutive), A382698 (3 consecutive), A382700 (5 consecutive).

Programs

  • Maple
    P:=proc(q) local a,b,c,d,n,v; v:=[];for n from 1 to 30 do a:=2; b:=3; c:=5; d:=7;
    while true do if frac((a+b)/n)=0 and frac((b+c)/n)=0 and frac((c+d)/n)=0 then v:=[op(v),a]; break;
    else a:=b; b:=c; c:=d; d:=nextprime(d); fi; od; od; op(v); end: P(2*10^6);
  • Mathematica
    Do[p=0;Until[Mod[Prime[p]+Prime[p+1],n]==0&&Mod[Prime[p+1]+Prime[p+2],n]==0&&Mod[Prime[p+2]+Prime[p+3],n]==0,p++];a[n]=Prime[p],{n,45}];Array[a,40] (* James C. McMahon, Apr 09 2025 *)

A382698 First member of the least set of 3 consecutive primes such that the sum of each pair of consecutive primes in this set is a multiple of n.

Original entry on oeis.org

2, 3, 5, 3, 43, 5, 977, 53, 313, 43, 787, 137, 9587, 977, 2473, 541, 3967, 313, 28979, 947, 3121, 787, 72823, 283, 47441, 9587, 81463, 4363, 61153, 2473, 478001, 21617, 160243, 3967, 132763, 8017, 227873, 28979, 218279, 12163, 1772119, 3121, 3070187, 57413, 841459
Offset: 1

Author

Paolo P. Lava, Apr 04 2025

Keywords

Examples

			a(5) = 43. The least 3 consecutive primes are 43, 47, 53:
  43 + 47 = 90 and 90/5 = 18;
  47 + 53 = 100 and 100/5 = 20.
a(41) = 1772119. The least 3 consecutive primes are 1772119, 1772167, 1772201:
  1772119 + 1772167 = 3544286 and 3544286/41 = 86446;
  1772167 + 1772201 = 3544368 and 3544368/41 = 86448.
		

Crossrefs

Cf. A254862 (2 consecutive), A382699 (4 consecutive), A382700 (5 consecutive).

Programs

  • Maple
    P:=proc(q) local a,b,c,n,v; v:=[]; for n from 1 to 45 do a:=2; b:=3; c:=5;
    while true do if frac((a+b)/n)=0 and frac((b+c)/n)=0 then v:=[op(v),a]; break;
    else a:=b; b:=c; c:=nextprime(c); fi; od; od; op(v); end: P(2*10^6);
  • Mathematica
    Do[p=0;Until[Mod[Prime[p]+Prime[p+1],n]==0&&Mod[Prime[p+1]+Prime[p+2],n]==0,p++];a[n]=Prime[p],{n,45}];Array[a,45] (* James C. McMahon, Apr 09 2025 *)

A382484 Least composite squarefree numbers k > n such that p + n divides k - n, for each prime p dividing k.

Original entry on oeis.org

385, 182, 195, 1054, 165, 26781, 1015, 4958, 2193, 79222, 5159, 113937, 5593, 160937, 6351, 196009, 3657, 6318638, 2755, 1227818, 12669, 41302, 2795, 152358, 12121, 366821, 21827, 17578, 36569, 12677695, 38335, 457907, 2553, 15334, 141155, 69722351, 1045, 14003, 4823, 2943805
Offset: 1

Author

Paolo P. Lava, Mar 29 2025

Keywords

Examples

			a(20) = 1227818 = 2 * 19 * 79 * 409 and
  (1227818 - 20) /(2 + 20) = 55809;
  (1227818 - 20) /(19 + 20) = 31482;
  (1227818 - 20) /(79 + 20) = 12402;
  (1227818 - 20) /(409 + 20) = 2862.
		

Programs

  • Maple
    with(numtheory): P:=proc(q) local d,k,ok,n,p;
    for n from 1 to 17 do for k from n+1 to q do
    if issqrfree(k) and not isprime(k) then p:=factorset(k); ok:=1;
    for d from 1 to nops(p) do if frac((k-n)/(p[d]+n))>0 then ok:=0;
    break; fi; od; if ok=1 then lprint(n,k); break; fi; fi; od; od; end: P(10^8);
  • PARI
    isok(k,n) = if (!issquarefree(k) || isprime(k), return(0)); my(f=factor(k)[,1]); for (i=1, #f, if ((k-n) % (f[i]+n), return(0));); return(1);
    a(n) = my(k=n+1); while (!isok(k, n), k++); k; \\ Michel Marcus, Mar 30 2025

Extensions

More terms from Michel Marcus, Mar 30 2025

A381732 Proceeding from left to right, between any two consecutive digits (d_i, d_i+1) of an integer k, write down apart the lacking consecutive digits, in increasing order if d_i d_i+1. If abs(d_i - d_i+1) = 0 or 1 no digit is added. Sequence lists integers k that divide such resulting numbers.

Original entry on oeis.org

27, 737, 909, 1845, 1912, 7078, 27412, 90009, 870129, 990099, 6852899, 9090909, 17388261, 70168376, 70787078, 96096078, 96707298, 162533711, 358006673, 737737737, 1050889491, 2238028254, 3281718034, 4249370147, 9009009009, 11819327599, 12178217823, 13851266943, 18768863945
Offset: 1

Author

Paolo P. Lava, Mar 05 2025

Keywords

Comments

These concatenations are part of the sequence:
'737' with itself, if it is not a multiple of 7;
'7078' with itself, if it is not a multiple of 3.

Examples

			27 is a term since between 2 and 7 we have 3456 and 3456 / 27 = 128;
1845 is a term since between 1 and 8 we have 234567, between 8 and 4 765 and between 4 and 5 no digit to be added and 234567765 / 1845 = 127137.
		

Programs

  • Python
    def f(n):
        s, out = list(map(int, str(n))), 0
        for i in range(len(s)-1):
            dir = 1 if s[i+1] - s[i] >= 0 else -1
            for j in range(s[i]+dir, s[i+1], dir):
                out = 10*out + j
        return out
    def ok(n):
        return (v:=f(n)) and v%n == 0
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Mar 06 2025

Extensions

a(19)-a(29) from Michael S. Branicky, Mar 07 2025