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

A002997 Carmichael numbers: composite numbers k such that a^(k-1) == 1 (mod k) for every a coprime to k.

Original entry on oeis.org

561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841, 29341, 41041, 46657, 52633, 62745, 63973, 75361, 101101, 115921, 126217, 162401, 172081, 188461, 252601, 278545, 294409, 314821, 334153, 340561, 399001, 410041, 449065, 488881, 512461, 530881, 552721
Offset: 1

Views

Author

Keywords

Comments

V. Šimerka found the first 7 terms of this sequence 25 years before Carmichael (see the link and also the remark of K. Conrad). - Peter Luschny, Apr 01 2019
k is composite and squarefree and for p prime, p|k => p-1|k-1.
An odd composite number k is a pseudoprime to base a iff a^(k-1) == 1 (mod k). A Carmichael number is an odd composite number k which is a pseudoprime to base a for every number a prime to k.
A composite odd number k is a Carmichael number if and only if k is squarefree and p-1 divides k-1 for every prime p dividing k. (Korselt, 1899)
Ghatage and Scott prove using Fermat's little theorem that (a+b)^k == a^k + b^k (mod k) (the freshman's dream) exactly when k is a prime (A000040) or a Carmichael number. - Jonathan Vos Post, Aug 31 2005
Alford et al. have constructed a Carmichael number with 10333229505 prime factors, and have also constructed Carmichael numbers with m prime factors for every m between 3 and 19565220. - Jonathan Vos Post, Apr 01 2012
Thomas Wright proved that for any numbers b and M in N with gcd(b,M) = 1, there are infinitely many Carmichael numbers k such that k == b (mod M). - Jonathan Vos Post, Dec 27 2012
Composite numbers k relatively prime to 1^(k-1) + 2^(k-1) + ... + (k-1)^(k-1). - Thomas Ordowski, Oct 09 2013
Composite numbers k such that A063994(k) = A000010(k). - Thomas Ordowski, Dec 17 2013
Odd composite numbers k such that k divides A002445((k-1)/2). - Robert Israel, Oct 02 2015
If k is a Carmichael number and gcd(b-1,k)=1, then (b^k-1)/(b-1) is a pseudoprime to base b by Steuerwald's theorem; see the reference in A005935. - Thomas Ordowski, Apr 17 2016
Composite numbers k such that p^k == p (mod k) for every prime p <= A285512(k). - Max Alekseyev and Thomas Ordowski, Apr 20 2017
If a composite m < A285549(n) and p^m == p (mod m) for every prime p <= prime(n), then m is a Carmichael number. - Thomas Ordowski, Apr 23 2017
The sequence of all Carmichael numbers can be defined as follows: a(1) = 561, a(n+1) = smallest composite k > a(n) such that p^k == p (mod k) for every prime p <= n+2. - Thomas Ordowski, Apr 24 2017
An integer m > 1 is a Carmichael number if and only if m is squarefree and each of its prime divisors p satisfies both s_p(m) >= p and s_p(m) == 1 (mod p-1), where s_p(m) is the sum of the base-p digits of m. Then m is odd and has at least three prime factors. For each prime factor p, the sharp bound p <= a*sqrt(m) holds with a = sqrt(17/33) = 0.7177.... See Kellner and Sondow 2019. - Bernd C. Kellner and Jonathan Sondow, Mar 03 2019
Carmichael numbers are special polygonal numbers A324973. The rank of the n-th Carmichael number is A324975(n). See Kellner and Sondow 2019. - Jonathan Sondow, Mar 26 2019
An odd composite number m is a Carmichael number iff m divides denominator(Bernoulli(m-1)). The quotient is A324977. See Pomerance, Selfridge, & Wagstaff, p. 1006, and Kellner & Sondow, section on Bernoulli numbers. - Jonathan Sondow, Mar 28 2019
This is setwise difference A324050 \ A008578. Many of the same identities apply also to A324050. - Antti Karttunen, Apr 22 2019
If k is a Carmichael number, then A309132(k) = A326690(k). The proof generalizes that of Theorem in A309132. - Jonathan Sondow, Jul 19 2019
Composite numbers k such that A111076(k)^(k-1) == 1 (mod k). Proof: the multiplicative order of A111076(k) mod k is equal to lambda(k), where lambda(k) = A002322(k), so lambda(k) divides k-1, qed. - Thomas Ordowski, Nov 14 2019
For all positive integers m, m^k - m is divisible by k, for all k > 1, iff k is either a Carmichael number or a prime, as is used in the proof by induction for Fermat's Little Theorem. Also related are A182816 and A121707. - Richard R. Forberg, Jul 18 2020
From Amiram Eldar, Dec 04 2020, Apr 21 2024: (Start)
Ore (1948) called these numbers "Numbers with the Fermat property", or, for short, "F numbers".
Also called "absolute pseudoprimes". According to Erdős (1949) this term was coined by D. H. Lehmer.
Named by Beeger (1950) after the American mathematician Robert Daniel Carmichael (1879 - 1967). (End)
For ending digit 1,3,5,7,9 through the first 10000 terms, we see 80.3, 4.1, 7.4, 3.8 and 4.3% apportionment respectively. Why the bias towards ending digit "1"? - Bill McEachen, Jul 16 2021
It seems that for any m > 1, the remainders of Carmichael numbers modulo m are biased towards 1. The number of terms congruent to 1 modulo 4, 6, 8, ..., 24 among the first 10000 terms: 9827, 9854, 8652, 8034, 9682, 5685, 6798, 7820, 7880, 3378 and 8518. - Jianing Song, Nov 08 2021
Alford, Granville and Pomerance conjectured in their 1994 paper that a statement analogous to Bertrand's Postulate could be applied to Carmichael numbers. This has now been proved by Daniel Larsen, see link below. - David James Sycamore, Jan 17 2023

References

  • N. G. W. H. Beeger, On composite numbers n for which a^n == 1 (mod n) for every a prime to n, Scripta Mathematica, Vol. 16 (1950), pp. 133-135.
  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover Publications, Inc. New York, 1966, Table 18, Page 44.
  • David M. Burton, Elementary Number Theory, 5th ed., McGraw-Hill, 2002.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 142.
  • CRC Standard Mathematical Tables and Formulae, 30th ed., 1996, p. 87.
  • Richard K. Guy, Unsolved Problems in Number Theory, A13.
  • Øystein Ore, Number Theory and Its History, McGraw-Hill, 1948, Reprinted by Dover Publications, 1988, Chapter 14.
  • Paul Poulet, Tables des nombres composés vérifiant le théorème du Fermat pour le module 2 jusqu'à 100.000.000, Sphinx (Brussels), 8 (1938), 42-45.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 22, 100-103.
  • Wacław Sierpiński, A Selection of Problems in the Theory of Numbers. Macmillan, NY, 1964, p. 51.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 145-146.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 561 at p. 157.

Crossrefs

Programs

  • Haskell
    a002997 n = a002997_list !! (n-1)
    a002997_list = [x | x <- a024556_list,
    all (== 0) $ map ((mod (x - 1)) . (subtract 1)) $ a027748_row x]
    -- Reinhard Zumkeller, Apr 12 2012
    
  • Magma
    [n: n in [3..53*10^4 by 2] | not IsPrime(n) and n mod CarmichaelLambda(n) eq 1]; // Bruno Berselli, Apr 23 2012
    
  • Maple
    filter:= proc(n)
      local q;
      if isprime(n) then return false fi;
      if 2 &^ (n-1) mod n <> 1 then return false fi;
      if not numtheory:-issqrfree(n) then return false fi;
      for q in numtheory:-factorset(n) do
        if (n-1) mod (q-1) <> 0 then return false fi
      od:
      true;
    end proc:
    select(filter, [seq(2*k+1,k=1..10^6)]); # Robert Israel, Dec 29 2014
    isA002997 := n -> 0 = modp(n-1, numtheory:-lambda(n)) and not isprime(n) and n <> 1:
    select(isA002997, [$1..10000]); # Peter Luschny, Jul 21 2019
  • Mathematica
    Cases[Range[1,100000,2], n_ /; Mod[n, CarmichaelLambda[n]] == 1 && ! PrimeQ[n]] (* Artur Jasinski, Apr 05 2008; minor edit from Zak Seidov, Feb 16 2011 *)
    Select[Range[1,600001,2],CompositeQ[#]&&Mod[#,CarmichaelLambda[#]]==1&] (* Harvey P. Dale, Jul 08 2023 *)
  • PARI
    Korselt(n)=my(f=factor(n));for(i=1,#f[,1],if(f[i,2]>1||(n-1)%(f[i,1]-1),return(0)));1
    isA002997(n)=n%2 && !isprime(n) && Korselt(n) && n>1 \\ Charles R Greathouse IV, Jun 10 2011
    
  • PARI
    is_A002997(n, F=factor(n)~)={ #F>2 && !foreach(F,f,(n%(f[1]-1)==1 && f[2]==1) || return)} \\ No need to check parity: if efficiency is needed, scan only odd numbers. - M. F. Hasler, Aug 24 2012, edited Mar 24 2022
    
  • Python
    from itertools import islice
    from sympy import nextprime, factorint
    def A002997_gen(): # generator of terms
        p, q = 3, 5
        while True:
            for n in range(p+2,q,2):
                f = factorint(n)
                if max(f.values()) == 1 and not any((n-1) % (p-1) for p in f):
                    yield n
            p, q = q, nextprime(q)
    A002997_list = list(islice(A002997_gen(),20)) # Chai Wah Wu, May 11 2022
  • Sage
    def isCarmichael(n):
        if n == 1 or is_even(n) or is_prime(n):
            return False
        factors = factor(n)
        for f in factors:
            if f[1] > 1: return False
            if (n - 1) % (f[0] - 1) != 0:
                return False
        return True
    print([n for n in (1..20000) if isCarmichael(n)]) # Peter Luschny, Apr 02 2019
    

Formula

Sum_{n>=1} 1/a(n) is in the interval (0.004706, 27.8724) (Bayless and Kinlaw, 2017). The upper bound was reduced to 0.0058 by Kinlaw (2023). - Amiram Eldar, Oct 26 2020, Feb 24 2024

Extensions

Links for lists of Carmichael numbers updated by Jan Kristian Haugland, Mar 25 2009 and Danny Rorabaugh, May 05 2017

A069359 a(n) = n * Sum_{p|n} 1/p where p are primes dividing n.

Original entry on oeis.org

0, 1, 1, 2, 1, 5, 1, 4, 3, 7, 1, 10, 1, 9, 8, 8, 1, 15, 1, 14, 10, 13, 1, 20, 5, 15, 9, 18, 1, 31, 1, 16, 14, 19, 12, 30, 1, 21, 16, 28, 1, 41, 1, 26, 24, 25, 1, 40, 7, 35, 20, 30, 1, 45, 16, 36, 22, 31, 1, 62, 1, 33, 30, 32, 18, 61, 1, 38, 26, 59, 1, 60, 1, 39, 40, 42, 18, 71, 1, 56
Offset: 1

Views

Author

Benoit Cloitre, Apr 15 2002

Keywords

Comments

Coincides with arithmetic derivative on squarefree numbers: a(A005117(n)) = A068328(n) = A003415(A005117(n)). - Reinhard Zumkeller, Jul 20 2003, Clarified by Antti Karttunen, Nov 15 2019
a(n) = n-1 iff n = 1 or n is a primary pseudoperfect number A054377. - Jonathan Sondow, Apr 16 2014
a(1) = 0 by the standard convention for empty sums.
“Seva” on the MathOverflow link asks if the iterates of this sequence are all eventually 0. - Charles R Greathouse IV, Feb 15 2019

Examples

			a(12) = 10 because the prime divisors of 12 are 2 and 3 so we have: 12/2 + 12/3 = 6 + 4 = 10. - _Geoffrey Critzer_, Mar 17 2015
		

Crossrefs

Cf. A322068 (partial sums), A323599 (Inverse Möbius transform).
Sequences of the form n^k * Sum_{p|n, p prime} 1/p^k for k = 0..10: A001221 (k=0), this sequence (k=1), A322078 (k=2), A351242 (k=3), A351244 (k=4), A351245 (k=5), A351246 (k=6), A351247 (k=7), A351248 (k=8), A351249 (k=9), A351262 (k=10).

Programs

  • Magma
    [0] cat [n*&+[1/p: p in PrimeDivisors(n)]:n in [2..80]]; // Marius A. Burtea, Jan 21 2020
    
  • Maple
    A069359 := n -> add(n/d, d = select(isprime, numtheory[divisors](n))):
    seq(A069359(i), i = 1..20); # Peter Luschny, Jan 31 2012
    # second Maple program:
    a:= n-> n*add(1/i[1], i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 23 2019
  • Mathematica
    f[list_, i_] := list[[i]]; nn = 100; a = Table[n, {n, 1, nn}]; b =
    Table[If[PrimeQ[n], 1, 0], {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Mar 17 2015 *)
  • PARI
    a(n) = n*sumdiv(n, d, isprime(d)/d); \\ Michel Marcus, Mar 18 2015
    
  • PARI
    a(n) = my(ps=factor(n)[,1]~);sum(k=1,#ps,n\ps[k]) \\ Franklin T. Adams-Watters, Apr 09 2015
    
  • Python
    from sympy import primefactors
    def A069359(n): return sum(n//p for p in primefactors(n)) # Chai Wah Wu, Feb 05 2022
  • Sage
    def A069359(n) :
        D = filter(is_prime, divisors(n))
        return add(n/d for d in D)
    print([A069359(i) for i in (1..20)]) # Peter Luschny, Jan 31 2012
    

Formula

G.f.: Sum(x^p(j)/(1-x^p(j))^2,j>=1), where p(j) is the j-th prime. - Vladeta Jovovic, Mar 29 2006
a(n) = A230593(n) - n. a(n) = A010051(n) (*) A000027(n), where operation (*) denotes Dirichlet convolution, that is, convolution of type: a(n) = Sum_(d|n) b(d) * c(n/d) = Sum_{d|n} A010051(d) * A000027(n/d). - Jaroslav Krizek, Nov 07 2013
a(A054377(n)) = A054377(n) - 1. - Jonathan Sondow, Apr 16 2014
Dirichlet g.f.: zeta(s - 1)*primezeta(s). - Geoffrey Critzer, Mar 17 2015
Sum_{k=1..n} a(k) ~ A085548 * n^2 / 2. - Vaclav Kotesovec, Feb 04 2019
From Antti Karttunen, Nov 15 2019: (Start)
a(n) = Sum_{d|n} A008683(n/d)*A323599(d).
a(n) = A003415(n) - A329039(n) = A230593(n) - n = A306369(n) - A000010(n).
a(n) = A276085(A329350(n)) = A048675(A329352(n)).
a(A276086(n)) = A329029(n), a(A328571(n)) = A329031(n).
(End)
a(n) = Sum_{d|n} A000010(d) * A001221(n/d). - Torlach Rush, Jan 21 2020
a(n) = Sum_{k=1..n} omega(gcd(n, k)). - Ilya Gutkovskiy, Feb 21 2020
a(p^k) = p^(k-1) for p prime and k>=1. - Wesley Ivan Hurt, Jul 15 2025

A007850 Giuga numbers: composite numbers n such that p divides n/p - 1 for every prime divisor p of n.

Original entry on oeis.org

30, 858, 1722, 66198, 2214408306, 24423128562, 432749205173838, 14737133470010574, 550843391309130318, 244197000982499715087866346, 554079914617070801288578559178, 1910667181420507984555759916338506
Offset: 1

Views

Author

D. Borwein, J. M. Borwein, P. B. Borwein and R. Girgensohn

Keywords

Comments

There are no other Giuga numbers with 8 or fewer prime factors. I did an exhaustive search using a PARI script which implemented Borwein and Girgensohn's method for finding n factor solutions given n - 2 factors. - Fred Schneider, Jul 04 2006
One further Giuga number is known with 10 prime factors, namely:
420001794970774706203871150967065663240419575375163060922876441614\
2557211582098432545190323474818 =
2 * 3 * 11 * 23 * 31 * 47059 * 2217342227 * 1729101023519 * 8491659218261819498490029296021 * 58254480569119734123541298976556403 but this may not be the next term. (See the Butske et al. paper.)
Conjecture: Giuga numbers are the solution of the differential equation n' = n + 1, where n' is the arithmetic derivative of n. - Paolo P. Lava, Nov 16 2009
n is a Giuga number if and only if n' = a*n + 1 for some integer a > 0 (see our preprint in arXiv:1103.2298). - José María Grau Ribas, Mar 19 2011
A composite number n is a Giuga number if and only if Sum_{i = 1..n-1} i^phi(n) == -1 (mod n), where phi(n) = A000010(n). - Jonathan Sondow, Jan 03 2014
A composite number n is a Giuga number if and only if Sum_{prime p|n} 1/p = 1/n + an integer. (In fact, all known Giuga numbers n satisfy Sum_{prime p|n} 1/p = 1/n + 1.) - Jonathan Sondow, Jan 08 2014
The prime factors of a(n) are listed as n-th row of A236434. - M. F. Hasler, Jul 13 2015
Conjecture: let k = a(n) and k be the product of x(n) distinct prime factors where x(n) <= x(n+1). Then, for any even n, n/2 + 2 <= x(n) <= n/2 + 3 and, for any odd n, (n+1)/2 + 2 <= x(n) <= (n+1)/2 + 3. For any n > 1, there are y "old" distinct prime factors o(1)...o(y) such that o(1) = 2, o(2) = 3, and z "new" distinct prime factors n(1)...n(z) such that none of them - unlike the "old" ones - can be a divisor of a(q) while q < n; n(1) > o(y), y = x(n) - z >= 2, 2 <= z <= b where b is either 4, or 1/2*n. - Sergey Pavlov, Feb 24 2017
Conjecture: a composite n is a Giuga number if and only if Sum_{k=1..n-1} k^lambda(n) == -1 (mod n), where lambda(n) = A002322(n). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
A composite number n is a Giuga number if and only if A326690(n) = 1. - Jonathan Sondow, Jul 19 2019
A composite n is a Giuga number if and only if n * A027641(phi(n)) == - A027642(phi(n)) (mod n^2). Note: Euler's phi function A000010 can be replaced by the Carmichael lambda function A002322. - Thomas Ordowski, Jun 07 2020
By von Staudt and Clausen theorem, a composite n is a Giuga number if and only if n * A027759(phi(n)) == A027760(phi(n)) (mod n^2). Note: Euler's phi function can be replaced by the Carmichael lambda function. - Thomas Ordowski, Aug 01 2020

Examples

			From _M. F. Hasler_, Jul 13 2015: (Start)
The prime divisors of 30 are {2, 3, 5}, and 2 divides 30/2-1 = 14, 3 divides 30/3-1 = 9, and 5 divides 30/5-1 = 5.
The prime divisors of 858 are {2, 3, 11, 13} and 858/2-1 = 428 is even, 858/3-1 = 285 is divisible by 3, 858/11-1 = 77 is a multiple of 11, and 858/13-1 = 65 = 13*5.
(End)
		

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 30, pp 11, Ellipses, Paris 2008.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := AllTrue[First /@ FactorInteger@ n, Divisible[n/# - 1, #] &]; Select[Range@ 100000, CompositeQ@ # && fQ@ # &] (* Michael De Vlieger, Oct 05 2015 *)
  • PARI
    is(n)=if(isprime(n), return(0)); my(f=factor(n)[,1]); for(i=1,#f, if((n/f[i])%f[i]!=1, return(0))); n>1 \\ Charles R Greathouse IV, Apr 28 2015
    
  • Python
    from itertools import count, islice
    from sympy import isprime, primefactors
    def A007850_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda x: not isprime(x) and all((x//p-1) % p == 0 for p in primefactors(x)), count(max(startvalue,2)))
    A007850_list = list(islice(A007850_gen(),4)) # Chai Wah Wu, Feb 19 2022

Formula

Sum_{i = 1..a(n)-1} i^phi(a(n)) == -1 (mod a(n)). - Jonathan Sondow, Jan 03 2014

Extensions

a(12) from Fred Schneider, Jul 04 2006
Further references from Fred Schneider, Aug 19 2006
Definition corrected by Jonathan Sondow, Sep 16 2012

A326715 Values of n for which the denominator of (Sum_{prime p | n} 1/p - 1/n) is 1.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 30, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Jonathan Sondow, Jul 20 2019

Keywords

Comments

n is in the sequence iff either n = 1 or n is a prime or n is a Giuga number, by one definition of Giuga numbers A007850.

Examples

			a(30) = denominator(Sum_{prime p | 30} 1/p - 1/30) = denominator(1/2 + 1/3 + 1/5 - 1/30) = denominator(1/1) = 1, and 30 is a Giuga number.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local p;
       denom(add(1/p, p = numtheory:-factorset(n))-1/n)=1
    end proc:
    select(filter, [$1..300]); # Robert Israel, Dec 15 2020
  • Mathematica
    PrimeFactors[n_] := Select[Divisors[n], PrimeQ];
    f[n_] := Denominator[Sum[1/p, {p, PrimeFactors[n]}] - 1/n];
    Select[Range[148], f[#] == 1 &]

Formula

n such that A326690(n) = 1.

A309132 a(n) is the denominator of F(n) = A027641(n-1)/n + A027642(n-1)/n^2.

Original entry on oeis.org

1, 1, 1, 16, 1, 36, 1, 64, 27, 100, 1, 144, 1, 196, 75, 256, 1, 324, 1, 400, 49, 484, 1, 576, 125, 676, 243, 784, 1, 900, 1, 1024, 363, 1156, 1225, 1296, 1, 1444, 169, 1600, 1, 1764, 1, 1936, 135, 2116, 1, 2304, 343, 2500, 867, 2704, 1, 2916, 3025, 3136, 361, 3364, 1, 3600, 1, 3844, 1323, 4096, 845, 4356, 1
Offset: 1

Views

Author

Thomas Ordowski, Jul 14 2019

Keywords

Comments

It seems that the numerator of F(n) is the numerator of (B(n-1) + 1/n), where B(k) is the k-th Bernoulli number; if so, for n > 2, the numerator of F(n) is A174341(n-1). How to prove it?
Conjecture: for n > 1, a(n) = 1 if and only if n is prime.
Is this conjecture equivalent to the Agoh-Giuga conjecture?
Theorem 1. If p is prime, then a(p) = 1. Proof. a(2) = 1, so let p be an odd prime. By the von Staudt-Clausen theorem, if k is even, then B(k) = A(k) - Sum_{prime q, q-1 | k} 1/q, where A(k) is an integer and the sum is over all primes q such that q-1 divides k. Thus B(k) = N(k)/D(k) with D(k) = Product_{prime q, q-1 | k} q. Now let k = p-1. Then N(p-1)/D(p-1) = B(p-1) = A(p-1) - 1/p - Sum_{prime q < p, q-1 | p-1} 1/q (*). Add 1/p to both sides of (*) and multiply by p*D(p-1) to get p*N(p-1) + D(p-1) = p*D(p-1)*(A(p-1) - Sum_{prime q < p, q-1 | p-1} 1/q) (**). Now p | D(p-1), so p^2 | p*D(p-1) in (**). The denominators on the right side of (**) are all of the form q < p. Therefore, p^2 divides both sides of (**). Hence F(p) = N(p-1)/p + D(p-1)/p^2 is an integer, so a(p) = 1. - Jonathan Sondow, Jul 14 2019
Conjecture: composite numbers n such that a(n) is squarefree are only the Carmichael numbers A002997. Cf. A309235. - Thomas Ordowski, Jul 15 2019
Conjecture checked up to n = 101101. - Amiram Eldar, Jul 16 2019
Theorem 2. If n is a prime or a Carmichael number, then a(n) = A326690(n) = denominator of (Sum_{prime p | n} 1/p - 1/n). The proof is a generalization of that of Theorem 1. (Note that Theorem 2 implies Theorem 1, since if n is prime, then (Sum_{prime p | n} 1/p - 1/n) = 1/n - 1/n = 0/1, so a(p) = A326690(n) = 1.) For n a prime or a Carmichael number, an application of Theorem 2 is computing a(n) without calculating Bernoulli(n-1) which may be huge; see A309268 and A326690. - Jonathan Sondow, Jul 19 2019
The values of F(n) when n is prime are A327033. - Jonathan Sondow, Aug 16 2019

Examples

			F(n) = 2/1, 0/1, 1/1, 1/16, 1/1, 1/36, 1/1, 1/64, 7/27, 1/100, 1/1, 1/144, -37/1, 1/196, 37/75, 1/256, -211/1, 1/324, 2311/1, 1/400, -407389/49, ...
		

Crossrefs

Programs

  • Magma
    [Denominator(Numerator(Bernoulli(n-1))/n + Denominator(Bernoulli(n-1))/n^2): n in [1..70]]; // Vincenzo Librandi, Jul 14 2019
  • Mathematica
    Table[Denominator[Numerator[BernoulliB[n - 1]] / n + Denominator[ BernoulliB[ n - 1]] / n^2], {n, 70}] (* Vincenzo Librandi, Jul 14 2019 *)
  • PARI
    a(n) = denominator(numerator(bernfrac(n-1))/n + denominator(bernfrac(n-1))/n^2); \\ Michel Marcus, Jul 14 2019
    

Formula

a(p) = 1 for prime p.
a(2k) = (2k)^2 for k > 1.
Conjecture: for k > 0, a(2k+1) = (2k+1)^2 iff 2k+1 is in A121707.
Denominator(F(p)/p) = 1 for the primes p = 2 and p = 1277 but for no other prime p < 1.5 * 10^4. Does denominator(F(p)/p) = 1 for any prime p > 1.5 * 10^4? - Jonathan Sondow, Jul 14 2019
Similarly, Sum_{k=1..p-1} k^(p-1) == -1 (mod p^2) for the prime p = 1277. - Thomas Ordowski, Jul 15 2019
a(n) = denominator(Sum_{prime p | n} 1/p - 1/n) if n is a prime or a Carmichael number. - Jonathan Sondow, Jul 19 2019

A174341 a(n) = Numerator of Bernoulli(n, 1) + 1/(n+1).

Original entry on oeis.org

2, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, -37, 1, 37, 1, -211, 1, 2311, 1, -407389, 1, 37153, 1, -1181819909, 1, 76977929, 1, -818946931, 1, 277930363757, 1, -84802531453217, 1, 90219075042851, 1, -711223555487930419, 1, 12696640293313423, 1, -6367871182840222481, 1, 35351107998094669831, 1, -83499808737903072705023, 1, 12690449182849194963361, 1
Offset: 0

Views

Author

Paul Curtz, Mar 16 2010

Keywords

Comments

a(n) is numerator of (A164555(n)/A027642(n) + 1/(n+1)).
1/(n+1) and Bernoulli(n,1) are autosequences in the sense that they remain the same (up to sign) under inverse binomial transform. This feature is kept for their sum, a(n)/A174342(n) = 2, 1, 1/2, 1/4, 1/6, 1/6, 1/6, 1/8, 7/90, 1/10, ...
Similar autosequences are also A000045, A001045, A113405, A000975 preceded by two zeros, and A140096.
Conjecture: the numerator of (A164555(n)/(n+1) + A027642(n)/(n+1)^2) is a(n) and the denominator of this fraction is equal to 1 if and only if n+1 is prime or 1. Cf. A309132. - Thomas Ordowski, Jul 09 2019
The "if" part of the conjecture is true: see the theorems in A309132 and A326690. The values of the numerator when n+1 is prime are A327033. - Jonathan Sondow, Aug 15 2019

Crossrefs

Programs

  • Magma
    [2,1] cat [Numerator(Bernoulli(n)+1/(n+1)): n in [2..40]]; // Vincenzo Librandi, Jul 18 2019
  • Maple
    A174341 := proc(n) bernoulli(n,1)+1/(n+1); numer(%) end proc: # R. J. Mathar, Nov 19 2010
  • Mathematica
    a[n_] := Numerator[BernoulliB[n, 1] + 1/(n + 1)];
    Table[a[n], {n, 0, 47}] (* Peter Luschny, Jul 13 2019 *)
  • PARI
    B(n)=if(n!=1, bernfrac(n), -bernfrac(n));
    a(n)=numerator(B(n) + 1/(n + 1));
    for(n=0, 50, print1(a(n),", ")) \\ Indranil Ghosh, Jun 19 2017
    
  • PARI
    a(n)=numerator(bernpol(n, 1) + 1/(n + 1)); \\ Michel Marcus, Jun 26 2025
    
  • Python
    from sympy import bernoulli, Integer
    def a(n): return (bernoulli(n) + 1/Integer(n + 1)).numerator # Indranil Ghosh, Jun 19 2017
    

Extensions

Reformulation of the name by Peter Luschny, Jul 13 2019

A190275 Semiprimes of the form p*(p^2 - p + 1).

Original entry on oeis.org

6, 21, 301, 2041, 296341, 486877, 2666437, 3420301, 4304341, 7152001, 38159521, 42387097, 54296677, 95235601, 158048281, 229971241, 265434901, 383712781, 454166017, 775307917, 972261181, 1063290841, 1304557801, 1392422041, 1730882401, 1863895261, 2631883561, 2879450461, 3714274297, 3845297341, 4070454361, 4256780041, 4849695001, 5328809461, 5722533337, 5838483601, 7218898681, 7841065621
Offset: 1

Views

Author

Giorgio Balzarotti, May 07 2011

Keywords

Comments

This sequence is infinite, assuming Schinzel's Hypothesis H.
Related to Rassias Conjecture ("for any odd prime p there are primes q < r such that p*q = q + r + 1") setting p = q. Generalization can be achieved by removing semiprimality condition and accepting p^e, e >= 2.
These are semiprimes m = p*q such that 1/p + 1/q - 1/m = p/q. Cf. A326690. - Amiram Eldar and Thomas Ordowski, Jul 22 2019

Examples

			a(1) = 6 = 2*3 = 2*(2^2-2+1).
a(2) = 21 = 3*7 = 3*(3^2-3+1).
a(3) = 301 = 7*43 = 7*(7^2-7+1).
		

Crossrefs

Cf. A065508 (primes p such that p^2-p+1 is prime).
Cf. A001358 (semiprime), A003415 (arithmetic derivative), A164643, A190272 (n'=a-1), A190273 (n'=a+1), A190274 (n'=p^2-1).

Programs

  • Maple
    seq(`if`(isprime((ithprime(i)^2-ithprime(i)+1))=true,(ithprime(i)^2-ithprime(i)+1)*ithprime(i),NULL),i=1..300);
  • Mathematica
    p = Select[Prime@ Range@ 500, PrimeQ[#^2 - # + 1] &]; p (p^2 - p + 1) (* Giovanni Resta, Jul 22 2019 *)
  • PARI
    forprime(p=2,1e4,if(isprime(k=p^2-p+1),print1(p*k", "))) \\ Charles R Greathouse IV, May 08 2011

A326689 Numerator of the fraction (Sum_{prime p | n} 1/p - 1/n).

Original entry on oeis.org

-1, 0, 0, 1, 0, 2, 0, 3, 2, 3, 0, 3, 0, 4, 7, 7, 0, 7, 0, 13, 3, 6, 0, 19, 4, 7, 8, 17, 0, 1, 0, 15, 13, 9, 11, 29, 0, 10, 5, 27, 0, 20, 0, 25, 23, 12, 0, 13, 6, 17, 19, 29, 0, 22, 3, 5, 7, 15, 0, 61, 0, 16, 29, 31, 17, 10, 0, 37, 25, 29, 0, 59, 0, 19, 13, 41
Offset: 1

Views

Author

Jonathan Sondow, Jul 18 2019

Keywords

Comments

See Comments on denominators in A326690.

Examples

			-1/1, 0/1, 0/1, 1/4, 0/1, 2/3, 0/1, 3/8, 2/9, 3/5, 0/1, 3/4, 0/1, 4/7, 7/15, 7/16, 0/1, 7/9, 0/1, 13/20, 3/7, 6/11, 0/1, 19/24, 4/25, 7/13, 8/27, 17/28, 0/1, 1/1
		

Crossrefs

Denominators are A326690. Cf. also A007850, A309132, A309235, A309378.
Cf. A028235.

Programs

  • Mathematica
    PrimeFactors[n_] := Select[Divisors[n], PrimeQ];
    g[n_] := Numerator[Sum[1/p, {p, PrimeFactors[n]}] - 1/n];
    Table[ g[n], {n, 100}]
  • PARI
    a(n) = numerator(sumdiv(n, d, isprime(d)/d) - 1/n); \\ Michel Marcus, Jul 19 2019

Formula

a(p) = 0 if p is a prime.
a(g) = 1 if g is a known Giuga number (see my 2nd comment in A007850).

A190273 Numbers n such that n' = m+1, with n and m semiprimes and gcd(m,n)>1, where n' is the arithmetic derivative of n.

Original entry on oeis.org

6, 10, 21, 26, 39, 55, 57, 74, 93, 111, 122, 146, 155, 201, 203, 253, 301, 305, 314, 327, 381, 386, 417, 471, 497, 543, 554, 597, 626, 633, 689, 737, 755, 791, 794, 842, 889, 905, 914, 921, 1011, 1027, 1055, 1081, 1082, 1137, 1226, 1227, 1322, 1346, 1379, 1461, 1466, 1477, 1497, 1514, 1623, 1655, 1703, 1711, 1713, 1731, 1751, 1754, 1893, 1967, 1994
Offset: 1

Views

Author

Giorgio Balzarotti, May 07 2011

Keywords

Comments

The sequence is related to the Rassias Conjecture ("for any prime p there are two primes p1 and p2 such that p*p1=p1+p2+1, p>2, p2>p1", see A190272-A190275), because n = p1*p2, m=p1*p -> p1*p = p1+p2-1. The sequence includes the cases with p=p1 (or p2). Generalization can be achieved by removing semiprimarity condition or accepting gcd(n,m)=1. The differential equation in its general form n'=m+1 includes Giuga Numbers, i.e., n'=b*n+1, or n'=n+1 (A007850).
These are semiprimes n = p*q such that 1/p + 1/q - 1/n = P/Q, where P <> Q are primes. Cf. A326690. - Amiram Eldar and Thomas Ordowski, Jul 25 2019

Examples

			n=6, 6'=5, m=5+1=6, gcd(6,6)=6 -> a(1)=6
		

Crossrefs

Cf. A001358 (semiprimes), A003415 (arithmetic derivative), A007850 (Giuga numbers), A190272 (n'=m-1), A190273, A190274, A190275.

Programs

  • Maple
    der:=n->n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
    seq(`if`(bigomega(i)=2 and bigomega(der(i)-1)=2 and gcd(i,der(i)-1)>1,i,NULL),i=1..2000);

A326691 a(n) = n/denominator(Sum_{prime p | n} 1/p - 1/n).

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 7, 1, 1, 2, 11, 3, 13, 2, 1, 1, 17, 2, 19, 1, 3, 2, 23, 1, 1, 2, 1, 1, 29, 30, 31, 1, 1, 2, 1, 1, 37, 2, 3, 1, 41, 2, 43, 1, 1, 2, 47, 3, 1, 2, 1, 1, 53, 2, 5, 7, 3, 2, 59, 1, 61, 2, 1, 1, 1, 6, 67, 1, 1, 2, 71, 1, 73, 2, 3, 1, 1, 2, 79
Offset: 1

Views

Author

Jonathan Sondow, Jul 20 2019

Keywords

Comments

Denominator(Sum_{prime p | n} 1/p - 1/n) is a factor of n, since all primes in the sum divide n. So a(n) is an integer.

Examples

			a(18) = 18/denominator(Sum_{prime p | 18} 1/p - 1/18) = 18/denominator(1/2 + 1/3 - 1/18) = 18/denominator(7/9) = 18/9 = 2.
a(30) = 30/denominator(Sum_{prime p | 30} 1/p - 1/30) = 30/denominator(1/2 + 1/3 + 1/5 - 1/30) = 30/denominator(1/1) = 30/1 = 30, and 30 is a Giuga number.
		

Crossrefs

Programs

  • Mathematica
    PrimeFactors[n_] := Select[Divisors[n], PrimeQ];
    f[n_] := Denominator[Sum[1/p, {p, PrimeFactors[n]}] - 1/n];
    Table[n/f[n], {n, 79}]
  • PARI
    A326691(n) = (n/A326690(n)); \\ Antti Karttunen, Mar 15 2021

Formula

a(n) = n/A326690(n).
a(n) = n > 1 iff n is either a prime or a Giuga number A007850.
a(n) = gcd(n, 1+((n-1)*A003415(n))). [Conjectured, after an empirical formula found by LODA miner. This holds at least up to n=2^27] - Antti Karttunen, Mar 15 2021
Showing 1-10 of 14 results. Next