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

A324370 Product of all primes p not dividing n such that the sum of the base-p digits of n is at least p, or 1 if no such prime exists.

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 6, 3, 10, 1, 6, 1, 210, 15, 2, 3, 30, 5, 210, 21, 110, 15, 30, 5, 546, 21, 14, 1, 30, 1, 462, 231, 1190, 105, 6, 1, 51870, 1365, 70, 21, 2310, 55, 2310, 105, 322, 105, 210, 35, 6630, 663, 286, 33, 330, 55, 798, 57, 290, 15, 30, 1, 930930, 15015, 1430, 2145, 1122, 85, 82110, 2415, 70, 3, 330, 55, 21111090, 285285
Offset: 1

Views

Author

Keywords

Comments

The product is finite, as the sum of the base-p digits of n is n if p > n.
a(198) = 2465 is the only term below 10^6 that is a Carmichael number (A002997).
It appears that a(n)=1 if and only if n is in A094960. - Robert Israel, Mar 30 2020
It turns out that a(n) equals the denominator of the first derivative of the Bernoulli polynomial B(n,x). So a(n)=1 if and only if n is in A094960, also impyling that n+1 is prime. A324370 is also involved in such formulas regarding higher derivatives. See Kellner 2023. - Bernd C. Kellner, Oct 12 2023

Examples

			For p = 2, 3, and 5, the sum of the base p digits of 7 is 1+1+1 = 3 >= 2, 2+1 = 3 >= 3, and 1+2 = 3 < 5, respectively, so a(7) = 2*3 = 6.
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    V:= Vector(N,1):
    p:= 1:
    for iter from 1 do
       p:= nextprime(p);
       if p >= N then break fi;
       for n from p+1 to N do
         if n mod p <> 0 and convert(convert(n,base,p),`+`)>= p then
           V[n]:= V[n]*p
         fi
    od od:
    convert(V,list); # Robert Israel, Mar 30 2020
    # Alternatively, note that this formula is suggesting offset 0 and a(0) = 1:
    seq(denom(diff(bernoulli(n, x), x)), n = 1..51); # Peter Luschny, Oct 13 2023
  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    DD2[n_] := Times @@ Select[Prime[Range[PrimePi[(n+1)/(2+Mod[n+1, 2])]]], !Divisible[n, #] && SD[n, #] >= # &];
    Table[DD2[n], {n, 1, 100}]
    (* From Bernd C. Kellner, Oct 12 2023 (Start) *)
    (* Denominator of first derivative of BP *)
    k = 1; Table[Denominator[Together[D[BernoulliB[n, x], {x, k}]]], {n, 1, 100}]
    (* End *)
  • Python
    from math import prod
    from sympy.ntheory import digits
    from sympy import primefactors, primerange
    def a(n):
        nonpf = set(primerange(1, n+1)) - set(primefactors(n))
        return prod(p for p in nonpf if sum(digits(n, p)[1:]) >= p)
    print([a(n) for n in range(1, 75)]) # Michael S. Branicky, Jul 03 2022

Formula

a(n) * A324369(n) = A195441(n-1) = denominator(Bernoulli_n(x) - Bernoulli_n).
a(n) * A324369(n) * A324371(n) = A144845(n-1) = denominator(Bernoulli_{n-1}(x)).
a(n+1) = A195441(n)/A324369(n+1) = A144845(n)/A007947(n+1) = A318256(n). Essentially the same as A318256. - Peter Luschny, Mar 05 2019
From Bernd C. Kellner, Oct 12 2023: (Start)
a(n) = denominator(Bernoulli_n(x)').
k-th derivative: let (n)_m be the falling factorial.
For n > k, a(n-k+1)/gcd(a(n-k+1), (n)_{k-1}) = denominator(Bernoulli_n(x)^(k)). Otherwise, the denominator equals 1. (End)

A324316 Primary Carmichael numbers.

Original entry on oeis.org

1729, 2821, 29341, 46657, 252601, 294409, 399001, 488881, 512461, 1152271, 1193221, 1857241, 3828001, 4335241, 5968873, 6189121, 6733693, 6868261, 7519441, 10024561, 10267951, 10606681, 14469841, 14676481, 15247621, 15829633, 17098369, 17236801, 17316001, 19384289, 23382529, 29111881, 31405501, 34657141, 35703361, 37964809
Offset: 1

Views

Author

Keywords

Comments

Squarefree integers m > 1 such that if prime p divides m, then the sum of the base-p digits of m equals p. It follows that m is then a Carmichael number (A002997).
Dickson's conjecture implies that the sequence is infinite, see Kellner 2019.
If m is a term and p is a prime factor of m, then p <= a*sqrt(m) with a = sqrt(66337/132673) = 0.7071..., where the bound is sharp.
The distribution of primary Carmichael numbers is A324317.
See Kellner and Sondow 2019 and Kellner 2019.
Primary Carmichael numbers are special polygonal numbers A324973. The rank of the n-th primary Carmichael number is A324976(n). See Kellner and Sondow 2019. - Jonathan Sondow, Mar 26 2019
The first term is the Hardy-Ramanujan number. - Omar E. Pol, Jan 09 2020

Examples

			1729 = 7 * 13 * 19 is squarefree, and 1729 in base 7 is 5020_7 = 5 * 7^3 + 0 * 7^2 + 2 * 7 + 0 with 5+0+2+0 = 7, and 1729 in base 13 is a30_13 with a+3+0 = 10+3+0 = 13, and 1729 in base 19 is 4f0_19 with 4+f+0 = 4+15+0 = 19, so 1729 is a member.
		

Crossrefs

Subsequence of A002997, A324315.
Least primary Carmichael number with n prime factors is A306657.

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    TestCP[n_] := (n > 1) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] == # &];
    Select[Range[1, 10^7, 2], TestCP[#] &]
  • Perl
    use ntheory ":all"; my $m; forsquarefree { $m=$; say if @ > 2 && is_carmichael($m) && vecall { $ == vecsum(todigits($m,$)) } @; } 1e7; # _Dana Jacobsen, Mar 28 2019
    
  • Python
    from sympy import factorint
    from sympy.ntheory import digits
    def ok(n):
        pf = factorint(n)
        if n < 2 or max(pf.values()) > 1: return False
        return all(sum(digits(n, p)[1:]) == p for p in pf)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jul 03 2022

Formula

a_1 + a_2 + ... + a_k = p if p is prime and m = a_1 * p + a_2 * p^2 + ... + a_k * p^k with 0 <= a_i <= p-1 for i = 1, 2, ..., k (note that a_0 = 0).

A324315 Squarefree integers m > 1 such that if prime p divides m, then the sum of the base p digits of m is at least p.

Original entry on oeis.org

231, 561, 1001, 1045, 1105, 1122, 1155, 1729, 2002, 2093, 2145, 2465, 2821, 3003, 3315, 3458, 3553, 3570, 3655, 3927, 4186, 4199, 4522, 4774, 4845, 4862, 5005, 5187, 5565, 5642, 5681, 6006, 6118, 6270, 6279, 6545, 6601, 6670, 6734, 7337, 7395, 7735, 8177, 8211, 8265, 8294, 8323, 8463, 8645, 8789, 8855, 8911, 9282, 9361, 9435, 9690, 9867
Offset: 1

Views

Author

Keywords

Comments

The sequence is infinite, because it contains all Carmichael numbers (A002997).
If m is a term and p is a prime factor of m, then p <= a*sqrt(m) with a = sqrt(11/21) = 0.7237..., where the bound is sharp.
A term m must have at least 3 prime factors if m is odd, and must have at least 4 prime factors if m is even.
m is a term if and only if m > 1 divides denominator(Bernoulli_m(x) - Bernoulli_m) = A195441(m-1).
A term m is a Carmichael number iff s_p(m) == 1 (mod p-1) whenever prime p divides m, where s_p(m) is the sum of the base p digits of m.
See Kellner and Sondow 2019.

Examples

			231 = 3 * 7 * 11 is squarefree, and 231 in base 3 is 22120_3 = 2 * 3^4 + 2 * 3^3 + 1 * 3^2 + 2 * 3 + 0 with 2+2+1+2+0 = 7 >= 3, and 231 = 450_7 with 4+5+0 = 9 >= 7, and 231 = 1a0_11 with 1+a+0 = 1+10+0 = 11 >= 11, so 231 is a member.
		

Crossrefs

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    TestS[n_] := (n > 1) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] >= # &];
    Select[Range[10^4], TestS[#] &]
  • Python
    from sympy import factorint
    from sympy.ntheory import digits
    def ok(n):
        pf = factorint(n)
        if n < 2 or max(pf.values()) > 1: return False
        return all(sum(digits(n, p)[1:]) >= p for p in pf)
    print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Jul 03 2022

Formula

a_1 + a_2 + ... + a_k >= p for m = a_1 * p + a_2 * p^2 + ... + a_k * p^k with 0 <= a_i <= p-1 for i = 1, 2, ..., k (note that a_0 = 0).

A324369 Product of all primes p dividing n such that the sum of the base p digits of n is at least p, or 1 if no such prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 3, 2, 1, 6, 1, 2, 1, 2, 1, 2, 1, 1, 3, 2, 1, 2, 1, 2, 3, 2, 1, 6, 1, 2, 15, 2, 1, 6, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 6, 1, 2, 3, 1, 5, 6, 1, 2, 3, 10, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 1, 2, 1, 2, 5, 2, 3, 2, 1, 10, 7, 2, 3, 2, 5, 6, 1
Offset: 1

Views

Author

Keywords

Comments

a(n) = n iff n divides denominator(Bernoulli_n(x) - Bernoulli_n) (see A195441).
a(n) = n iff n = 1 or n is in A324315.
a(n) = n if n is a Carmichael number (A002997).
See the section on Bernoulli polynomials in Kellner and Sondow 2019.

Examples

			6 = 2 * 3, and 6 = 110_2 in base 2 with 1+1+0 >= 2, but 6 = 20_3 in base 3 with 2+0 = 2 < 3, so a(6) = 2.
		

Crossrefs

Programs

  • Maple
    g:= proc(n,p) convert(convert(n,base,p),`+`) >= p end proc:
    f:= proc(n) local p;
          convert(select(p -> g(n,p), numtheory:-factorset(n)),`*`)
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 28 2019
  • Mathematica
    SD[n_, p_] := If[n < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    DD1[n_] := Times @@ Select[LP[n], SD[n, #] >= # &];
    Table[DD1[n], {n, 1, 100}]
  • Python
    from math import prod
    from sympy.ntheory import digits
    from sympy import primefactors as pf
    def a(n): return prod(p for p in pf(n) if sum(digits(n, p)[1:]) >= p)
    print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Jul 03 2022

Formula

a(n) * A324371(n) = A007947(n) = radical(n).
a(n) * A324370(n) = A195441(n-1) = denominator(Bernoulli_n(x) - Bernoulli_n).
a(n) * A324370(n) * A324371(n) = A144845(n-1) = denominator(Bernoulli_{n-1}(x)).

A324371 Product of all primes p dividing n such that the sum of the base p digits of n is less than p, or 1 if no such prime.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 1, 5, 13, 3, 7, 29, 15, 31, 2, 11, 17, 35, 3, 37, 19, 13, 5, 41, 7, 43, 11, 1, 23, 47, 1, 7, 5, 17, 13, 53, 3, 55, 7, 19, 29, 59, 5, 61, 31, 7, 2, 13, 11, 67, 17, 23, 7, 71, 1, 73, 37, 5, 19, 77, 13, 79, 5, 3, 41, 83, 21
Offset: 1

Views

Author

Keywords

Comments

Does not contain any elements of A324315, and thus none of the Carmichael numbers A002997.
See the section on Bernoulli polynomials in Kellner and Sondow 2019.

Examples

			For p = 2 and 3, the sum of the base p digits of 6 is 1+1+0 = 2 >= 2 and 2+0 = 2 < 3, respectively, so a(6) = 3.
		

Crossrefs

Programs

  • Maple
    f:= n -> convert(select(p -> convert(convert(n,base,p),`+`)Robert Israel, Apr 26 2020
  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    DD3[n_] := Times @@ Select[LP[n], SD[n, #] < # &];
    Table[DD3[n], {n, 1, 100}]
  • Python
    from math import prod
    from sympy.ntheory import digits
    from sympy import primefactors as pf
    def a(n): return prod(p for p in pf(n) if sum(digits(n, p)[1:]) < p)
    print([a(n) for n in range(1, 85)]) # Michael S. Branicky, Jul 03 2022

Formula

a(n) * A324369(n) = A007947(n) = radical(n).
a(n) * A195441(n) = a(n) * A324369(n) * A324370(n) = A144845(n-1) = denominator(Bernoulli_{n-1}(x)).

A324319 Terms of A324315 (squarefree integers m > 1 such that if prime p divides m, then the sum of the base p digits of m is at least p) that are also hexagonal numbers (A000384) with index equal to their largest prime factor.

Original entry on oeis.org

231, 561, 3655, 5565, 8911, 10585, 13695, 23653, 32131, 45451, 59685, 74305, 108345, 115921, 157641, 243253, 248865, 302253, 314821, 334153, 371091, 392055, 417241, 458403, 505515, 546535, 688551, 702705, 795691, 821121, 915981, 932295, 1004653, 1145341, 1181953
Offset: 1

Views

Author

Keywords

Comments

561, 8911, and 10585 are also Carmichael numbers (A002997).
The smallest primary Carmichael number (A324316) in the sequence is 8801128801 = 181 * 733 * 66337 = A000384(66337).
See the section on polygonal numbers in Kellner and Sondow 2019.
Subsequence of the special polygonal numbers A324973. - Jonathan Sondow, Mar 27 2019

Examples

			A324315(1) = 231 = 3 * 7 * 11 = 11 * (2 * 11 - 1) = A000384(11), so 231 is a member.
		

Crossrefs

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    HN[n_] := n(2n - 1);
    TestS[n_] := (n > 1) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] >= # &];
    Select[HN@ Prime[Range[100]], TestS[#] &]

Extensions

More terms from Amiram Eldar, Dec 05 2020

A324404 Squarefree integers m > 1 such that if prime p divides m, then s_p(m) >= p and s_p(m) == 2 (mod p-1), where s_p(m) is the sum of the base p digits of m.

Original entry on oeis.org

1122, 3458, 5642, 6734, 11102, 13202, 17390, 17822, 21170, 22610, 27962, 31682, 46002, 58682, 61778, 79730, 82082, 93314, 105266, 106262, 125490, 127946, 136202, 150722, 153254, 177122, 182002, 202202, 203870, 214370, 231842, 252434, 274298, 278462, 305102, 315282
Offset: 1

Views

Author

Keywords

Comments

For d >= 1 define S_d = (terms m in A324315 such that s_p(m) == d (mod p-1) if prime p divides m). Then S_1 is precisely the Carmichael numbers (A002997), S_2 is A324404, S_3 is A324405, and the union of all S_d for d >= 1 is A324315.
Subsequence of the 2-Knödel numbers (A050990). Generally, for d > 1 the terms of S_d that are greater than d form a subsequence of the d-Knödel numbers.
See Kellner and Sondow 2019.

Examples

			1122 = 2*3*11*17 is squarefree and equals 10001100010_2, 1112120_3, 930_11, and 3f0_17 in base p = 2, 3, 11, and 17. Then s_2(1122) = 1+1+1+1 = 4 >= 2, s_3(1122) = 1+1+1+2+1+2 = 8 >= 3, s_11(1122) = 9+3 = 12 >= 11, and s_17(1122) = 3+f = 3+15 = 18 >= 17. Also, s_2(1122) = 4 == 2 (mod 1), s_3(1122) = 8 == 2 (mod 2), s_11(1122) = 12 == 2 (mod 10), and s_17(1122) = 18 == 2 (mod 16), so 1122 is a member.
		

Crossrefs

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    TestSd[n_, d_] := (n > 1) && (d > 0) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] >= # && Mod[SD[n, #] - d, # - 1] == 0 &];
    Select[Range[200000], TestSd[#, 2] &]

Extensions

More terms from Amiram Eldar, Dec 05 2020

A324405 Squarefree integers m > 1 such that if prime p divides m, then s_p(m) >= p and s_p(m) == 3 (mod p-1), where s_p(m) is the sum of the base p digits of m.

Original entry on oeis.org

3003, 3315, 5187, 7395, 8463, 14763, 19803, 26733, 31755, 47523, 50963, 58035, 62403, 88023, 105339, 106113, 123123, 139971, 152643, 157899, 166611, 178923, 183183, 191919
Offset: 1

Views

Author

Keywords

Comments

For d >= 1 define S_d = (terms m in A324315 such that s_p(m) == d (mod p-1) if prime p divides m). Then S_1 is precisely the Carmichael numbers (A002997), S_2 is A324404, S_3 is A324405, and the union of all S_d for d >= 1 is A324315.
Subsequence of the 3-Knödel numbers (A033553). Generally, for d > 1 the terms of S_d that are greater than d form a subsequence of the d-Knödel numbers.
See Kellner and Sondow 2019.

Examples

			3003 = 3*7*11*13 is squarefree and equals 11010020_3, 11520_7, 2290_11, and 14a0_13 in base p = 3, 7, 11, and 13. Then s_3(3003) = 1+1+1+2 = 5 >= 3, s_7(3003) = 1+1+5+2 = 9 >= 7, s_11(3003) = 2+2+9 = 13 >= 11, and s_13(3003) = 1+4+a = 1+4+10 = 15 >= 13. Also, s_3(3003) = 5 == 3 (mod 2), s_7(3003) = 9 == 3 (mod 6), s_11(3003) = 13 == 3 (mod 10), and s_13(3003) = 15 == 3 (mod 12), so 3003 is a member.
		

Crossrefs

Programs

  • Mathematica
    SD[n_, p_] := If[n < 1 || p < 2, 0, Plus @@ IntegerDigits[n, p]];
    LP[n_] := Transpose[FactorInteger[n]][[1]];
    TestSd[n_, d_] := (n > 1) && (d > 0) && SquareFreeQ[n] && VectorQ[LP[n], SD[n, #] >= # && Mod[SD[n, #] - d, # - 1] == 0 &];
    Select[Range[200000], TestSd[#, 3] &]

A324317 Number of primary Carmichael numbers (A324316) less than 10^n.

Original entry on oeis.org

0, 0, 0, 2, 4, 9, 19, 51, 107, 219, 417, 757, 1470, 2666, 5040, 9280, 17210, 32039, 59762, 111811, 210627, 397968
Offset: 1

Views

Author

Keywords

Comments

The number of Carmichael numbers (A002997) less than 10^n is 0, 0, 1, 7, 16, 43, 105, 255, 646, 1547, 3605, 8241, 19279, 44706, 105212, 246683, 585355, 1401644, ... (see A055553).
The terms up to a(10) are given in Table 1 of Kellner and Sondow 2019. The terms up to a(18) and related results are given in Table 1.5 of Kellner 2019.
All computations depend on Pinch's database.

Examples

			There are two primary Carmichael numbers less than 10^4, namely, 1729 and 2821, so a(4) = 2.
		

Crossrefs

Extensions

a(11)-a(18) from Amiram Eldar, Mar 01 2019
a(19) from Amiram Eldar, Dec 05 2020
a(20)-a(22) calculated using data from Claude Goutier and added by Amiram Eldar, Apr 22 2024

A324318 Number of terms in A324315 (squarefree integers m > 1 such that if prime p divides m, then the sum of the base p digits of m is at least p) less than 10^n.

Original entry on oeis.org

0, 0, 2, 57, 636, 7048, 75150, 801931, 8350039, 86361487
Offset: 1

Views

Author

Keywords

Comments

The number of squarefree integers less than 10^n is 0, 6, 61, 608, 6083, 60794, 607926, 6079291, 60792694, 607927124, ... (see A053462).

Examples

			There are two terms of A324315 less than 10^3, namely, 231 and 561, so a(3) = 2.
		

Crossrefs

Showing 1-10 of 11 results. Next