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: Torlach Rush

Torlach Rush's wiki page.

Torlach Rush has authored 109 sequences. Here are the ten most recent ones:

A383080 Numbers k such that sopf(k) does not divide evenly sopfr(k).

Original entry on oeis.org

12, 18, 20, 24, 28, 40, 44, 45, 48, 50, 52, 54, 56, 60, 63, 68, 72, 75, 76, 80, 84, 88, 90, 92, 96, 98, 99, 104, 108, 112, 116, 117, 120, 124, 126, 132, 135, 136, 140, 144, 147, 148, 150, 152, 153, 156, 160, 162, 164, 168, 171, 172, 175, 176, 180, 184, 188, 189, 198
Offset: 1

Author

Torlach Rush, Apr 15 2025

Keywords

Comments

First differs from A059404 and A323055 at n = 59.
a(n) has a square factor, A008683(a(n)) = 0.
If p and q are distinct primes, p*q^k is in the sequence iff p + q does not divide k - 1. - Robert Israel, Apr 16 2025

Examples

			12 is a term because sopf(12)=5 does not evenly divide sopfr(12)=7.
18 is a term because sopf(18)=5 does not evenly divide sopfr(18)=8.
20 is a term because sopf(20)=7 does not evenly divide sopfr(20)=9.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F,t;
      F:= ifactors(n)[2];
      add(t[1]*t[2],t=F) mod add(t[1],t=F) <> 0
    end proc:
    select(filter, [$2..300]); # Robert Israel, Apr 16 2025
  • Mathematica
    q[k_] := Module[{f = FactorInteger[k]}, !Divisible[Plus @@ Times @@@ f, Plus @@ f[[;; , 1]]]]; Select[Range[200], q] (* Amiram Eldar, Apr 16 2025 *)
  • PARI
    isok(k) = if (k>1, my(f=factor(k)); sum(j=1, #f~, f[j,1]*f[j,2]) % sum(j=1, #f~, f[j,1])); \\ Michel Marcus, Apr 16 2025
  • Sage
    def spf(k):
        fl = list(factor(k))
        sr = sum(p * e for p, e in fl)
        sd = sum(p for p, _ in fl)
        return sd, sr
    def output(limit=198):
        results = []
        for k in range(2, limit + 1):
            sd, sr = spf(k)
            if 0 < sd and sr % sd != 0:
                results.append(k)
        return results
    print(output())
    

A381844 Quotients of A380487.

Original entry on oeis.org

1, 3, 5, 7, 11, 19, 23, 34, 91, 105, 209, 221, 231, 385, 399, 429, 481, 609, 665, 715, 805, 897, 1001, 1105, 1430, 1729, 1870, 2046, 2233, 2261, 3094, 3230, 3553, 3565, 3774, 4278, 4862, 4921, 4945, 5270, 5358, 5365, 6409, 6670, 7429, 7462, 7657, 7990, 8041, 8569
Offset: 1

Author

Torlach Rush, Mar 10 2025

Keywords

Comments

Sequence is strictly increasing based on definition of A380487.

Examples

			1 is a term because rad(2)/sopf(2) = 2/2.
3 is a term because rad(30)/sopf(30) = 30/10.
5 is a term because rad(70)/sopf(70) = 70/14.
		

Crossrefs

Programs

  • Maple
    f:= proc(n,m) local q,S;
       S:= numtheory:-factorset(n);
       q:= convert(S,`*`)/convert(S,`+`);
       if q::integer and q > m  then q else 0 fi;
    end proc:
    m:= 0: R:= NULL: count:= 0:
    for n from 2 while count < 50 do
      v:= f(n,m);
      if v > 0 then
        m:= v; R:= R,v; count:= count+1;
      fi;
    od:
    R; # Robert Israel, Apr 30 2025
  • PARI
    lista(nn) = my(m=0, list=List()); for (n=2, nn, my(f=factor(n)[,1], q=factorback(f)/vecsum(f)); if ((denominator(q) == 1) && (q>m), listput(list, q); m=q);); Vec(list); \\ Michel Marcus, Mar 29 2025
  • Sage
    def sopf(n): return sum(set(prime_factors(n)))
    def rad(n):
        rad = 1
        for p in set(prime_factors(n)): rad *= p
        return rad
    def output(limit=39):
        results = []
        n = 2
        result = 0
        while len(results) < limit:
            sopf_n = sopf(n)
            rad_n = rad(n)
            if rad_n % sopf_n == 0 and result < rad_n / sopf_n:
                result = rad_n / sopf_n
                print(result, end=', ')
            n += 1
        return
    output()
    

A380487 Numbers such that the sum of prime factors without repetition divides the product of prime factors without repetition and each division yields a greater quotient.

Original entry on oeis.org

2, 30, 70, 105, 231, 627, 805, 1122, 2730, 3570, 8778, 9282, 10626, 15015, 24738, 24882, 31746, 33495, 33915, 44330, 45885, 49335, 51051, 62985, 72930, 95095, 106590, 132990, 145145, 156009, 170170, 222870, 230945, 274505, 290598, 329406, 335478, 418285, 449995
Offset: 1

Author

Torlach Rush, Jan 24 2025

Keywords

Comments

Conjecture: There exists m, the smallest positive integer such that a(k)|a(k+m), for all k.

Examples

			2 is a term because sopf(2)|rad(2) = 2|2.
30 is a term because sopf(30)|rad(30) = 10|30.
70 is a term because sopf(70)|rad(70) = 14|70.
		

Crossrefs

Subsequence of A086486.

Programs

  • Maple
    f:= proc(n,m) local q,S;
       S:= numtheory:-factorset(n);
       q:= convert(S,`*`)/convert(S,`+`);
       if q::integer and q > m  then q else 0 fi;
    end proc:
    m:= 0: R:= NULL: count:= 0:
    for n from 2 while count < 50 do
      v:= f(n,m);
      if v > 0 then
        m:= v;  R:= R, n; count:= count+1;
      fi;
    od:
    R; # Robert Israel, Apr 30 2025
  • Mathematica
    s={};q=0;Do[pf=Times@@First/@FactorInteger[n];sf=Total[First/@FactorInteger[n]];If[Divisible[pf,sf]&&pf/sf>q,AppendTo[s,n];q=pf/sf],{n,2,449995}];s (* James C. McMahon, Apr 03 2025 *)
  • PARI
    lista(nn) = my(m=0, list=List()); for (n=2, nn, my(f=factor(n)[,1], q=factorback(f)/vecsum(f)); if ((denominator(q) == 1) && (q>m), listput(list, n); m=q);); Vec(list); \\ Michel Marcus, Mar 29 2025
  • Sage
    def sopf(n): return sum(set(prime_factors(n)))
    def rad(n):
        rad = 1
        for p in set(prime_factors(n)): rad *= p
        return rad
    def output(limit=39):
        results = []
        n = 2
        result = 0
        while len(results) < limit:
            sopf_n = sopf(n)
            rad_n = rad(n)
            if rad_n % sopf_n == 0 and result < rad_n / sopf_n:
                results.append(n)
                result = rad_n / sopf_n
                print(n, end=', ')
            n += 1
        return results
    output()
    

A378993 a(n) = n - omega(n), where omega = A001221.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 7, 8, 8, 10, 10, 12, 12, 13, 15, 16, 16, 18, 18, 19, 20, 22, 22, 24, 24, 26, 26, 28, 27, 30, 31, 31, 32, 33, 34, 36, 36, 37, 38, 40, 39, 42, 42, 43, 44, 46, 46, 48, 48, 49, 50, 52, 52, 53, 54, 55, 56, 58, 57, 60, 60, 61, 63, 63, 63, 66, 66
Offset: 1

Author

Torlach Rush, Dec 17 2024

Keywords

Examples

			a(40) = 38, since 40 has two distinct prime divisors (2 and 5), and so 40 - 2 = 38.
a(41) = 40 also, since 41 is prime and therefore 41 - 1 = 40.
a(42) = 39, since 42 has three distinct prime divisors (2, 3, 7), and so 42 - 3 = 39.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=n-PrimeNu[n]; Array[a,68] (* Stefano Spezia, Dec 29 2024 *)
  • PARI
    a(n) = n - omega(n);

Formula

a(n) = n - A001221(n).

A376927 Totients whose inverses can be separated into ordered pairs (x, 2*x) with no remainder.

Original entry on oeis.org

1, 6, 10, 18, 22, 28, 30, 42, 46, 52, 54, 58, 66, 70, 78, 82, 100, 102, 106, 110, 126, 130, 136, 138, 148, 150, 162, 166, 172, 178, 180, 190, 196, 198, 210, 222, 226, 228, 238, 250, 262, 268, 270, 282, 292, 294, 306, 310, 316, 330, 342, 346, 348, 358, 366, 372
Offset: 1

Author

Torlach Rush, Oct 11 2024

Keywords

Comments

Conjecture: Numbers having an even number of totient inverses, the odd inverses being confined to the lower half of the list.

Examples

			1 is a totient and has totient inverses 1 and 2, giving an ordered pair (1, 2*1)
6 is a totient and has totient inverses 7, 9, 14, 18 giving ordered pairs (7,2*7) and (9, 2*9).
18 is a totient and has totient inverses 19, 27, 38, 54 giving ordered pairs (19,2*19) and (27, 2*27).
348 is a totient and has totient inverses 349, 413, 531, 698, 826, 1062 giving ordered pairs (349, 2*349), (413, 2*413), and (531, 2*531).
		

Crossrefs

Subset of A002202.

Programs

  • Maple
    q:= n-> (s-> s<>{} and ((x, y)-> x = map(t->t/2, y))(
        selectremove(x-> x::odd, s)))({numtheory[invphi](n)[]}):
    select(q, [$1..543])[];  # Alois P. Heinz, Nov 21 2024
  • Mathematica
    okQ[k_] := With[{s = Sort[invphi[k]]}, s != {} && Select[s, EvenQ]/2 == Select[s, OddQ]];
    Reap[For[k = 1, k <= 1000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Apr 04 2025, using Maxim Rytin's 'invphi' program (see A007617) *)
  • PARI
    evencardinality(list)={e=0;o=0;if(0 < #list,if(0 == Mod(#list, 2),for(i=1,#list,if(1==Mod(list[i],2),o++,e++)),o++), o++);return(if(o==e, 1, 0))}
    for(n = 1, 372, if(1 == evencardinality(invphi(n)), print1(n, ", ")));

A376639 Terms of A151999 which are not a term of A293928.

Original entry on oeis.org

10, 30, 34, 42, 50, 60, 68, 78, 90, 102, 110, 114, 126, 136, 150, 156, 170, 180, 204, 210, 220, 222, 228, 234, 250, 270, 294, 300, 306, 330, 340, 342, 378, 390, 408, 410, 420, 438, 444, 450, 456, 468, 510, 514, 540, 546, 550, 570, 578, 582, 612, 630, 654, 660, 666
Offset: 1

Author

Torlach Rush, Sep 30 2024

Keywords

Comments

Conjecture: For each a(n) there is no a(n) = A000010(a(k)), k > n.
Conjecture: Every term of A293928 exists in A151999.

Examples

			10 is a term because 2 divides 4 and 10 and 10 is not a term of A293928.
666 is a term because 666 is a term of A151999 and 666 is not a term of A293928 as it has no totient inverses.
		

Crossrefs

Programs

  • Sage
    terms = []
    for n in range(1, 10000): # Equivalent of A151999/b151999.txt
        if euler_phi(n)**2 == euler_phi(euler_phi(n) * n): terms.append(n)
    displayTerms = []
    for n in range(0,10000):
        searchTerms = terms[n+1::]
        found = False
        for k in range(0, len(searchTerms)):
            if terms[n] == euler_phi(searchTerms[k]):
                found = True
                break
        if False == found and n < len(terms):
            displayTerms.append(terms[n])
    for n in range(0, 55):
        print(displayTerms[n], end=', ')

A370513 Complement of A323599.

Original entry on oeis.org

2, 5, 29, 39, 53, 59, 73, 95, 119, 123, 125, 129, 137, 145, 147, 149, 157, 159, 163, 173, 179, 191, 199, 207, 209, 213, 219, 221, 235, 251, 257, 263, 265, 269, 271, 279, 291, 293, 299, 303, 305, 325, 327, 329, 343, 345, 347, 359, 365, 367, 369, 375, 385, 395, 397
Offset: 1

Author

Torlach Rush, Feb 20 2024

Keywords

Comments

Terms of this sequence are not solutions of Sum_{d|k} A069359(d), k >= 1.
Proof that 2 is not a solution of Sum_{d|k} A069359(d), k >= 1: (Start)
If 2 is a solution then the only summands of the above are either (0,2) or (0,1,1).
(0,2) cannot be the only summands. If 2 is a summand then it is also a divisor of a(n) and A069359(2) = 1. If 2 is a summand then so must 1 be a summand.
(0,1,1) cannot be the only summands. There must exist an additional summand A069359(p_1*p_2) where p_1 and p_2 (primes) contribute to each 1 in (0,1,1).
(End)
To prove that 5 is not a solution of Sum_{d|k} A069359(d), k >= 1 we need to show that each of the following summands cannot exist: (0,5), (0,1,4), (0,1,2,2), (0,1,1,3), (0,1,1,1,2). (0,1,1,1,1,1). Following from the above proof this is elementary.

Examples

			2 is a term because it is not a solution of Sum_{d|k} A069359(d), k >= 1. See proof in Comments.
		

Crossrefs

A370238 a(n) = n*(3*n + 23)/2.

Original entry on oeis.org

0, 13, 29, 48, 70, 95, 123, 154, 188, 225, 265, 308, 354, 403, 455, 510, 568, 629, 693, 760, 830, 903, 979, 1058, 1140, 1225, 1313, 1404, 1498, 1595, 1695, 1798, 1904, 2013, 2125, 2240, 2358, 2479, 2603, 2730, 2860, 2993, 3129, 3268, 3410, 3555, 3703, 3854, 4008
Offset: 0

Author

Torlach Rush, Feb 12 2024

Keywords

Comments

a(a(1)) = A000566(a(1)). This is also true for each of the sequences provided in the formulae below; e.g., A151542(A151542(1)) = A000566(A151542(1)).

Programs

  • Mathematica
    Table[n(3n+23)/2,{n,0,48}] (* James C. McMahon, Feb 20 2024 *)
  • Python
    def a(n): return n*(3*n+23)//2

Formula

a(n) = n*(3*n + 23)/2 = A277976(n)/2.
G.f.: x*(13-10*x)/(1-x)^3.
a(n) = A151542(n) + n.
a(n) = A140675(n) + 2*n.
a(n) = A140674(n) + 3*n.
a(n) = A140673(n) + 4*n.
a(n) = A140672(n) + 5*n.
a(n) = A059845(n) + 6*n.
a(n) = A140091(n) + 7*n.
a(n) = A140090(n) + 8*n.
a(n) = A115067(n) + 9*n.
a(n) = A045943(n) + 10*n.
a(n) = A005449(n) + 11*n.
a(n) = A000326(n) + A008594(n).
Sum_{n>=1} 1/a(n) = 823467/2769844 + sqrt(3)*Pi/69 -3*log(3)/23 = 0.2328608... - R. J. Mathar, Apr 23 2024
E.g.f.: exp(x)*x*(26 + 3*x)/2. - Stefano Spezia, Apr 26 2024

A368880 Primes in A024528.

Original entry on oeis.org

3, 11, 61, 457, 5237, 1226677, 34543329507310391, 1636619248175258407, 5186576044693944076609, 742779051038516950393163206833793, 1506853388294906471801157206440769816406928024502711, 651879075122842895567706351814676957742356330143458665568047
Offset: 1

Author

Torlach Rush, Jan 08 2024

Keywords

Comments

Primes which are the sum of the numerator and the denominator of partial sums of the reciprocals of primes.
Each term of this sequence can be expressed as the sum of an expression with exactly one odd term and n even terms, where the odd term is A002110(n)/A002110(1), and n > 0 (see Alexander Adamchuk comment in A024528).
a(2) = 11 = 3 + 2 + 6 contains the only prime odd term 3.

Examples

			3 is a term because 1/2 = 1/2 and 1 + 2 = 3 which is prime.
11 is a term because 1/2 + 1/3 = 5/6 and 5 + 6 = 11 which is prime.
61 is a term because 5/6 + 1/5 = 31/30 and 31 + 30 = 61 which is prime.
457 is a term because 31/30 + 1/7 = 247/210 and 247 + 210 = 457 which is prime.
		

Crossrefs

Intersection of A000040 and A024528.
Cf. A002110.

A365649 Dirichlet convolution of sigma with Dedekind psi function.

Original entry on oeis.org

1, 6, 8, 22, 12, 48, 16, 66, 41, 72, 24, 176, 28, 96, 96, 178, 36, 246, 40, 264, 128, 144, 48, 528, 97, 168, 176, 352, 60, 576, 64, 450, 192, 216, 192, 902, 76, 240, 224, 792, 84, 768, 88, 528, 492, 288, 96, 1424, 177, 582, 288, 616, 108, 1056, 288, 1056, 320
Offset: 1

Author

Torlach Rush, Sep 14 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (2 + ((e + 1)*p^2 - 2*p - e - 1)*p^e)/(p - 1)^2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 15 2023 *)
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1+X) / ((1-X) * (1 - p*X)^2))[n], ", ")) \\ Vaclav Kotesovec, Sep 15 2023
    
  • Python
    from sympy import divisors, primefactors, prod, reduced_totient, divisor_sigma
    def psi(n):
        return n*prod(p+1 for p in primefactors(n))//prod(primefactors(n))
    def a(n): return sum(divisor_sigma(d, 1) * psi(n//d) for d in divisors(n))

Formula

a(n) = Sum{d|n} A000203(d) * A001615(n/d).
a(p) = A365647(p) + 2 = A365648(p) + 2 where p is a term of A000040.
Multiplicative with a(p^e) = (2 + ((e+1)*p^2 - 2*p - e - 1)*p^e)/(p-1)^2. - Amiram Eldar, Sep 15 2023
From Vaclav Kotesovec, Sep 15 2023: (Start)
Dirichlet g.f.: zeta(s)^2 * zeta(s-1)^2 / zeta(2*s).
Sum_{k=1..n} a(k) ~ 5*n^2 * (log(n)/4 + gamma/2 - 1/8 + 3*zeta'(2)/Pi^2 - 45*zeta'(4)/Pi^4), where gamma is the Euler-Mascheroni constant A001620. (End)