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

A181835 The sum of the primes <= n that are strongly prime to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 0, 5, 8, 12, 7, 10, 12, 23, 19, 24, 31, 39, 36, 53, 51, 60, 54, 64, 72, 90, 80, 82, 88, 91, 90, 119, 127, 144, 127, 129, 143, 155, 139, 160, 174, 190, 185, 226, 225, 260, 248, 256
Offset: 0

Views

Author

Peter Luschny, Nov 17 2010

Keywords

Comments

k is strongly prime to n iff k is relatively prime to n and k does not divide n-1.

Examples

			a(11) = 3 + 7 = 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    Primes := n -> select(k->isprime(k),{$1..n}):
    StrongCoprimes := n -> select(k->igcd(k,n)=1,{$1..n}) minus divisors(n-1):
    StrongCoprimePrimes := n -> Primes(n) intersect StrongCoprimes(n):
    A181835 := proc(n) local i; add(i,i=StrongCoprimePrimes(n)) end:
  • Mathematica
    a[n_] := Select[Range[2, n], PrimeQ[#] && CoprimeQ[#, n] && !Divisible[n-1, #] &] // Total; Table[a[n], {n, 0, 47}] (* Jean-François Alcover, Jun 28 2013 *)

A066913 (sum of primes < n that do not divide n) (mod n).

Original entry on oeis.org

0, 0, 2, 3, 0, 5, 3, 7, 5, 0, 6, 11, 2, 4, 3, 7, 7, 17, 1, 10, 4, 20, 8, 23, 20, 7, 16, 7, 13, 29, 5, 30, 14, 5, 8, 11, 12, 24, 25, 30, 33, 16, 23, 4, 3, 26, 46, 35, 27, 21, 2, 1, 10, 52, 35, 36, 17, 2, 27, 10, 13, 34, 50, 51, 28, 23, 32, 5, 59, 64, 0, 58, 55, 7, 29, 7, 1, 70, 1
Offset: 1

Views

Author

Leroy Quet, Jan 22 2002

Keywords

Examples

			a(8) = (3 + 5 + 7) (mod 8) = 7 because 3, 5 and 7 are the primes < 8 that do not divide 8.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[Total[Select[Prime[Range[PrimePi[n]]],Mod[n,#]!=0&]],n],{n,80}] (* Harvey P. Dale, Aug 06 2019 *)
  • PARI
    a(n) = sum(i=1, n-1, if (isprime(i) && (n%i), i)) % n; \\ Michel Marcus, May 20 2014

Formula

a(n) = A066911(n) modulo n. - Michel Marcus, May 20 2014
a(prime(n)) = A071089(n). - Michel Marcus, May 20 2014

A143655 Triangle read by rows, primes not dividing n; A054521 * (A061397 * 0^(n-k)), 1<=k<=n.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 2, 3, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, 3, 0, 5, 0, 0, 0, 0, 3, 0, 5, 0, 7, 0, 0, 2, 0, 0, 5, 0, 7, 0, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 7, 0, 0, 0, 11, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 0, 11, 0
Offset: 1

Views

Author

Gary W. Adamson, Aug 28 2008

Keywords

Comments

Row sums = A066911: (0, 0, 2, 3, 5, 5, 10, 15, 14,....)

Examples

			First few rows of the triangle =
0;
0, 0;
0, 2, 0;
0, 0, 3, 0;
0, 2, 3, 0, 0;
0, 0, 0, 0, 5, 0;
0, 2, 3, 0, 5, 0, 0;
0, 0, 3, 0, 5, 0, 7, 0;
...
Row 8 has 3 primes < 8 not dividing 8: (3, 5, 7); where (3 + 5 + 7) = A066911(8).
		

Crossrefs

Formula

Triangle read by rows, A054521 * (A061397 * 0^(n-k)), 1<=k<=n. T(n,k) = prime if k is prime but does not divide n. A054521 = a triangle with row sums phi(n). A061397 = (0, 2, 3, 0, 5, 0, 7,...)

A115333 Sum of primes that do not divide n and are less than the largest prime dividing n.

Original entry on oeis.org

0, 0, 2, 0, 5, 0, 10, 0, 2, 3, 17, 0, 28, 8, 2, 0, 41, 0, 58, 3, 7, 15, 77, 0, 5, 26, 2, 8, 100, 0, 129, 0, 14, 39, 5, 0, 160, 56, 25, 3, 197, 5, 238, 15, 2, 75, 281, 0, 10, 3, 38, 26, 328, 0, 12, 8, 55, 98, 381, 0, 440, 127, 7, 0, 23, 12, 501, 39, 74, 3, 568, 0, 639, 158, 2, 56, 10
Offset: 1

Views

Author

Leroy Quet, Mar 05 2006

Keywords

Comments

When n is prime, n = largest prime dividing n; hence a(n) is the sum of all primes less than n = A034387(n)-n. a(n) = SUM{p such that p is in A000040 AND NOT(p|n) AND p < A006530(n)}. - Jonathan Vos Post, Mar 08 2006
The zeros give A055932: All prime divisors are consecutive primes starting at 2. - Robert G. Wilson v, May 01 2006

Examples

			The primes < 7 and coprime to 7 are 2, 3 and 5. So a(7) = 2+3+5 = 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Complement[Prime@ Range@ PrimePi[ Max[First /@ FactorInteger@n] - 1], First /@ FactorInteger@n]; Array[f, 77] (* Hans Havermann, Mar 06 2006 *)

Extensions

More terms from Hans Havermann, Mar 06 2006

A349555 a(n) = Sum_{p<=n, p prime} p^floor(1/gcd(n/p)).

Original entry on oeis.org

0, 1, 3, 4, 6, 7, 11, 16, 15, 12, 18, 25, 29, 34, 35, 40, 42, 55, 59, 72, 69, 66, 78, 97, 96, 87, 98, 93, 101, 122, 130, 159, 148, 143, 150, 157, 161, 178, 183, 192, 198, 229, 239, 270, 275, 258, 282, 325, 322, 323, 310, 315, 329, 378, 367, 374, 361, 352, 382, 433, 441, 470
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 21 2021

Keywords

Comments

For each prime number p less than or equal to n, add 1 if p|n, otherwise add p (see example).

Examples

			a(9) = 15; The primes less than or equal to 9 are 2, 3, 5, 7 and only 3|9. We then have, respectively, a(9) = 2 + 1 + 5 + 7 = 15.
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[Total[Map[If[Mod[n,#]==0,1,#]&,Prime[Range[PrimePi[n]]]]],{n,nterms}] (* Paolo Xausa, Nov 22 2021 *)

Formula

a(n) = A001221(n) + A066911(n).
Showing 1-5 of 5 results.