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-12 of 12 results.

A368278 Prime numbers that have an odd number of monotone Bacher representations (A368276).

Original entry on oeis.org

2, 3, 11, 19, 29, 31, 37, 41, 47, 67, 73, 89, 97, 101, 103, 149, 151, 157, 163, 173, 179, 197, 229, 233, 251, 263, 269, 281, 283, 311, 349, 373, 383, 397, 409, 419, 433, 443, 463, 487, 491, 521, 523, 557, 577, 587, 601, 607, 619, 659, 661, 673, 677, 701, 719
Offset: 1

Views

Author

Peter Luschny, Dec 19 2023

Keywords

Comments

We call a quadruple (w, x, y, z) of nonnegative integers a monotone Bacher representation of n if and only if n = w*x + y*z and w <= x < y <= z.

Examples

			For n = 19, the 5 solutions are (w, x, y, z) = (0, 0, 1, 19), (1, 1, 2, 9), (1, 1, 3, 6), (1, 3, 4, 4), (2, 2, 3, 5).
		

Crossrefs

Programs

  • Julia
    using Nemo
    println([n for n in 1:720 if isodd(A368276(n)) && is_prime(n)])
    
  • Mathematica
    t[n_]:=t[n]=Select[Divisors[n],#^2<=n&];
    A368276[n_]:=Total[t[n]]+Sum[Boole[wxA368276[#]]&] (* Paolo Xausa, Jan 02 2024 *)
  • Python
    from itertools import takewhile, islice
    from sympy import divisors, nextprime
    def A368278_gen(startvalue=2): # generator of terms >= startvalue
        p = max(nextprime(startvalue-1),2)
        while True:
            c = sum(takewhile(lambda x:x**2<=p,divisors(p))) & 1
            for wx in range(1,(p>>1)+1):
                for d1 in divisors(wx):
                    if d1**2 > wx:
                        break
                    m = p-wx
                    c = c+sum(1 for d in takewhile(lambda x:x**2<=m,divisors(m)) if wxA368278_list = list(islice(A368278_gen(),30)) # Chai Wah Wu, Dec 19 2023

A368582 a(n) = floor((sigma(n) + 1) / 2).

Original entry on oeis.org

1, 2, 2, 4, 3, 6, 4, 8, 7, 9, 6, 14, 7, 12, 12, 16, 9, 20, 10, 21, 16, 18, 12, 30, 16, 21, 20, 28, 15, 36, 16, 32, 24, 27, 24, 46, 19, 30, 28, 45, 21, 48, 22, 42, 39, 36, 24, 62, 29, 47, 36, 49, 27, 60, 36, 60, 40, 45, 30, 84, 31, 48, 52, 64, 42, 72, 34, 63
Offset: 1

Views

Author

Peter Luschny, Dec 31 2023

Keywords

Crossrefs

Cf. A000203, A000079 (2^n), A000396 (perfect), A088580, A317306, A368207 (Bacher).

Programs

  • Julia
    using Nemo
    A368582(n::Int) = div(divisor_sigma(n, 1) + 1, 2)
    println([A368582(n) for n in 1:68])
    
  • Mathematica
    Array[Floor[(DivisorSigma[1, #] + 1)/2] &, 120] (* Michael De Vlieger, Dec 31 2023 *)
  • PARI
    a(n) = (sigma(n)+1)\2; \\ Michel Marcus, Jan 03 2024

Formula

a(p) = (p + 1) / 2 for all odd prime p.
a(n) = n <=> n term of union of A000079 and A000396. (If there are no odd perfect numbers also of A317306).
a(n) = floor(A088580(n)/2). - Omar E. Pol, Dec 31 2023
Previous Showing 11-12 of 12 results.