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

A053144 Cototient of the n-th primorial number.

Original entry on oeis.org

1, 4, 22, 162, 1830, 24270, 418350, 8040810, 186597510, 5447823150, 169904387730, 6317118448410, 260105476071210, 11228680258518030, 529602053223499410, 28154196550210460730, 1665532558389396767070
Offset: 1

Views

Author

Labos Elemer, Feb 28 2000

Keywords

Comments

a(n) > A005367(n), a(n) > A002110(n)/2.
Limit_{n->oo} a(n)/A002110(n) = 1 because (in the limit) the quotient is the probability that a randomly selected integer contains at least one of the first n primes in its factorization. - Geoffrey Critzer, Apr 08 2010

Examples

			In the reduced residue system of q(4) = 2*3*5*7 - 210 the number of coprimes to 210 is 48, while a(4) = 210 - 48 = 162 is the number of values divisible by one of the prime factors of q(4).
		

Crossrefs

Cf. A000040 (prime numbers).
Column 1 of A281891.

Programs

  • Mathematica
    Abs[Table[ Total[Table[(-1)^(k + 1)* Total[Apply[Times, Subsets[Table[Prime[n], {n, 1, m}], {k}], 2]], {k, 0, m - 1}]], {m, 1, 22}]] (* Geoffrey Critzer, Apr 08 2010 *)
    Array[# - EulerPhi@ # &@ Product[Prime@ i, {i, #}] &, 17] (* Michael De Vlieger, Feb 17 2019 *)
  • PARI
    a(n) = prod(k=1, n, prime(k)) - prod(k=1, n, prime(k)-1); \\ Michel Marcus, Feb 08 2019

Formula

a(n) = A051953(A002110(n)) = A002110(n) - A005867(n).
a(n) = a(n-1)*A000040(n) + A005867(n-1). - Bob Selcoe, Feb 21 2016
a(n) = (1/A000040(n+1) - A038110(n+1)/A038111(n+1))*A002110(n+1). - Jamie Morken, Feb 08 2019
a(n) = A161527(n)*A002110(n)/A060753(n+1). - Jamie Morken, May 13 2022

A174909 Triangle T(n,i) whose n-th row gives the number of numbers in any prime(n)# consecutive numbers whose smallest prime factor is prime(n-i+1).

Original entry on oeis.org

1, 1, 3, 2, 5, 15, 8, 14, 35, 105, 48, 88, 154, 385, 1155, 480, 624, 1144, 2002, 5005, 15015, 5760, 8160, 10608, 19448, 34034, 85085, 255255, 92160, 109440, 155040, 201552, 369512, 646646, 1616615, 4849845, 1658880, 2119680, 2517120, 3565920
Offset: 1

Views

Author

T. D. Noe, Apr 01 2010

Keywords

Comments

Here prime(n)# denotes the product of the first n primes. Row n begins with A005867(n-1). The other n-1 terms in row n are prime(n) times the previous row. The sum of the terms in row n is cototient(prime(n)#), which is A053144(n), and which equals prime(n)#-A005867(n). This sequence is a generalization of a comment in A005867 by Dennis Martin.

Examples

			For n=3, we have prime(n)=5 and any range of 2*3*5=30 consecutive numbers has 2 numbers whose smallest prime factor is 5, 5 numbers whose smallest prime factor is 3, and 15 numbers whose smallest prime factor is 2.
From _Bob Selcoe_, Oct 12 2017: (Start)
Triangle starts:
n/i  1   2   3    4    5     6
1    1
2    1   3
3    2   5   15
4    8  14   35  105
5   48  88  154  385  1155
6  480 624 1144 2002  5005 15015
(End)
		

Crossrefs

Cf. A002110, A005867 (first column), A020639, A053144, A070826 (main diagonal).
Cf. A293558 (transpose).

Programs

  • Mathematica
    t={{1}}; q=2; Do[p=Prime[n]; t=AppendTo[t, Join[{(q-1)*t[[ -1,1]]}, p*t[[ -1]]]]; q=p, {n,2,9}]; Flatten[t]
    (* Second program: *)
    Block[{nn = 8, s}, s = Array[FactorInteger[#][[1, 1]] &, Product[Prime@i, {i, nn}]]; Table[With[{P = Product[Prime@ k, {k, n}]}, Count[Take[s, P], ?(# == Prime[n - i + 1] &)]], {n, nn}, {i, n}]] (* _Michael De Vlieger, Oct 14 2017 *)
Showing 1-2 of 2 results.