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.

A172042 a(n) = A000010(A083553(n)).

Original entry on oeis.org

1, 4, 8, 16, 32, 64, 96, 120, 240, 192, 288, 384, 384, 528, 1056, 1344, 896, 960, 960, 1152, 1728, 1920, 3200, 2560, 2560, 2560, 3328, 3744, 3456, 4032, 3456, 6144, 5632, 6336, 5760, 5760, 7776, 8856, 13776, 14784, 8448, 8640, 9216, 10752, 10080, 8640
Offset: 1

Views

Author

Giovanni Teofilatto, Jan 24 2010

Keywords

Comments

Except for the first term, a(n) is divisible by 4.

Crossrefs

Programs

  • Maple
    A083553 := proc(n) (ithprime(n+1)-1)*(ithprime(n)-1) ; end proc: A172042 := proc(n) numtheory[phi](A083553(n)) ; end proc: seq(A172042(n),n=1..80) ; # R. J. Mathar, Jan 30 2010
  • Mathematica
    Table[EulerPhi[(Prime[n + 1] - 1)*(Prime[n] - 1)], {n, 1, 50}] (* Amiram Eldar, Apr 09 2021 *)
  • PARI
    a(n)=my(p=prime(n));eulerphi((p-1)*(nextprime(p+1)-1)) \\ Charles R Greathouse IV, Mar 05 2013

Extensions

a(2) inserted and terms beyond a(10) added by R. J. Mathar, Jan 30 2010

A256617 Numbers having exactly two distinct prime factors, which are also adjacent prime numbers.

Original entry on oeis.org

6, 12, 15, 18, 24, 35, 36, 45, 48, 54, 72, 75, 77, 96, 108, 135, 143, 144, 162, 175, 192, 216, 221, 225, 245, 288, 323, 324, 375, 384, 405, 432, 437, 486, 539, 576, 648, 667, 675, 768, 847, 864, 875, 899, 972, 1125, 1147, 1152, 1215, 1225, 1296, 1458, 1517, 1536, 1573, 1715, 1728, 1763, 1859, 1875, 1944
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 05 2015

Keywords

Examples

			.   n | a(n)                      n | a(n)
. ----+------------------       ----+------------------
.   1 |   6 = 2 * 3              13 |  77 = 7 * 11
.   2 |  12 = 2^2 * 3            14 |  96 = 2^5 * 3
.   3 |  15 = 3 * 5              15 | 108 = 2^2 * 3^3
.   4 |  18 = 2 * 3^2            16 | 135 = 3^3 * 5
.   5 |  24 = 2^3 * 3            17 | 143 = 11 * 13
.   6 |  35 = 5 * 7              18 | 144 = 2^4 * 3^2
.   7 |  36 = 2^2 * 3^2          19 | 162 = 2 * 3^4
.   8 |  45 = 3^2 * 5            20 | 175 = 5^2 * 7
.   9 |  48 = 2^4 * 3            21 | 192 = 2^6 * 3
.  10 |  54 = 2 * 3^3            22 | 216 = 2^3 * 3^3
.  11 |  72 = 2^3 * 3^2          23 | 221 = 13 * 17
.  12 |  75 = 3 * 5^2            24 | 225 = 3^2 * 5^2 .
		

Crossrefs

Subsequence of A007774.
Subsequences: A006094, A033845, A033849, A033851.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a256617 n = a256617_list !! (n-1)
    a256617_list = f (singleton (6, 2, 3)) $ tail a000040_list where
       f s ps@(p : ps'@(p':_))
         | m < p * p' = m : f (insert (m * q, q, q')
                              (insert (m * q', q, q') s')) ps
         | otherwise  = f (insert (p * p', p, p') s) ps'
         where ((m, q, q'), s') = deleteFindMin s
    
  • Mathematica
    Select[Range[2000], MatchQ[FactorInteger[#], {{p_, }, {q, }} /; q == NextPrime[p]]&] (* _Jean-François Alcover, Dec 31 2017 *)
  • PARI
    is(n) = if(omega(n)!=2, return(0), my(f=factor(n)[, 1]~); if(f[2]==nextprime(f[1]+1), return(1))); 0 \\ Felix Fröhlich, Dec 31 2017
    
  • PARI
    list(lim)=my(v=List(),c=sqrtnint(lim\=1,3),d=nextprime(c+1),p=2); forprime(q=3,d, for(i=1,logint(lim\q,p), my(t=p^i); while((t*=q)<=lim, listput(v,t))); p=q); forprime(q=d+1,lim\precprime(sqrtint(lim)), listput(v,p*q); p=q); Set(v) \\ Charles R Greathouse IV, Apr 12 2020
    
  • Python
    from sympy import primefactors, nextprime
    A256617_list = []
    for n in range(1,10**5):
        plist = primefactors(n)
        if len(plist) == 2 and plist[1] == nextprime(plist[0]):
            A256617_list.append(n) # Chai Wah Wu, Aug 23 2021

Formula

A001222(a(n)) = 2.
A006530(a(n)) = A151800(A020639(n)) = A000040(A049084(A020639(a(n)))+1).
Sum_{n>=1} 1/a(n) = Sum_{n>=1} 1/A083553(n) = Sum_{n>=1} 1/((prime(n)-1)*(prime(n+1)-1)) = 0.7126073495... - Amiram Eldar, Dec 23 2020

A379010 Square array A(n, k) = phi(A246278(n, k)), read by falling antidiagonals; Euler totient function applied to the prime shift array.

Original entry on oeis.org

1, 2, 2, 2, 6, 4, 4, 8, 20, 6, 4, 18, 24, 42, 10, 4, 12, 100, 60, 110, 12, 6, 24, 40, 294, 120, 156, 16, 8, 20, 120, 72, 1210, 192, 272, 18, 6, 54, 48, 420, 160, 2028, 288, 342, 22, 8, 40, 500, 96, 1320, 216, 4624, 396, 506, 28, 10, 36, 168, 2058, 180, 2496, 352, 6498, 616, 812, 30, 8, 24, 200, 660, 13310, 264, 4896, 504, 11638, 840, 930, 36
Offset: 1

Views

Author

Antti Karttunen, Dec 14 2024

Keywords

Comments

Each column is strictly increasing.

Examples

			The top left corner of the array:
k=  |  1     2     3      4     5      6     7        8      9     10
2k= |  2     4     6      8    10     12    14       16     18     20
----+-------------------------------------------------------------------
1   |  1,    2,    2,     4,    4,     4,    6,       8,     6,     8,
2   |  2,    6,    8,    18,   12,    24,   20,      54,    40,    36,
3   |  4,   20,   24,   100,   40,   120,   48,     500,   168,   200,
4   |  6,   42,   60,   294,   72,   420,   96,    2058,   660,   504,
5   | 10,  110,  120,  1210,  160,  1320,  180,   13310,  1560,  1760,
6   | 12,  156,  192,  2028,  216,  2496,  264,   26364,  3264,  2808,
7   | 16,  272,  288,  4624,  352,  4896,  448,   78608,  5472,  5984,
8   | 18,  342,  396,  6498,  504,  7524,  540,  123462,  9108,  9576,
9   | 22,  506,  616, 11638,  660, 14168,  792,  267674, 17864, 15180,
10  | 28,  812,  840, 23548, 1008, 24360, 1120,  682892, 26040, 29232,
11  | 30,  930, 1080, 28830, 1200, 33480, 1260,  893730, 39960, 37200,
12  | 36, 1332, 1440, 49284, 1512, 53280, 1656, 1823508, 59040, 55944,
		

Crossrefs

Cf. A062570 (row 1), A006093 (column 1), A036689 (column 2), A083553 (column 3), A135177 (column 4).

Programs

  • PARI
    up_to = 11325; \\ = binomial(150+1,2)
    A246278sq(row,col) = if(1==row,2*col, my(f = factor(2*col)); for(i=1, #f~, f[i,1] = prime(primepi(f[i,1])+(row-1))); factorback(f));
    A379010sq(row,col) = eulerphi(A246278sq(row,col));
    A379010list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A379010sq(col,(a-(col-1))))); (v); };
    v379010 = A379010list(up_to);
    A379010(n) = v379010[n];

A099407 Number of points of self-intersection of the path of a billiard ball traveling at a 45-degree angle on a prime(n) X prime(n+1) billiard table. Also equal to 1/2 the number of the lattice points lying within a prime(n) X prime(n+1) rectangle.

Original entry on oeis.org

1, 4, 12, 30, 60, 96, 144, 198, 308, 420, 540, 720, 840, 966, 1196, 1508, 1740, 1980, 2310, 2520, 2808, 3198, 3608, 4224, 4800, 5100, 5406, 5724, 6048, 7056, 8190, 8840, 9384, 10212, 11100, 11700, 12636, 13446, 14276, 15308, 16020, 17100, 18240, 18816
Offset: 1

Views

Author

Matthew Howells (mathmatt(AT)gmail.com), Nov 17 2004

Keywords

Examples

			a(2) = 4. Since prime(2) is 3 and prime(2+1) is 5, we are playing on a 3x5 billiard table. A ball struck from one corner will cross its own path 4 times before it strikes another corner to return along its own path.
		

Crossrefs

Programs

  • Mathematica
    list = {}; For[i = 1, i < 100, i++, AppendTo[list, (Prime[i] - 1)(Prime[i + 1] - 1)/2]]; list
    ((First[#]-1)(Last[#]-1))/2&/@Partition[Prime[Range[50]],2,1] (* Harvey P. Dale, Nov 13 2013 *)

Formula

a(n) = (prime(n) - 1)*(prime(n+1) - 1)/2.

A083549 Quotient if least common multiple (lcm) of cototient values of consecutive integers is divided by the greatest common divisor (gcd) of the same pair of consecutive numbers.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 12, 2, 6, 8, 8, 8, 56, 56, 8, 12, 12, 12, 12, 12, 12, 16, 80, 70, 126, 144, 16, 22, 22, 16, 208, 234, 198, 264, 24, 20, 12, 40, 24, 30, 30, 24, 56, 56, 24, 32, 224, 210, 570, 532, 28, 36, 60, 480, 672, 70, 30, 44, 44, 32, 864, 864, 544, 782, 46, 36, 900
Offset: 1

Views

Author

Labos Elemer, May 22 2003

Keywords

Examples

			n=33: cototient(33) = 33-20 = 13, cototient(34) = 34-16 = 18;
lcm(13,18) = 234, gcd(13,18) = 1, so a(34) = 234.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := x-EulerPhi[x]; Table[LCM[f[w+1], f[w]]/GCD[f[w+1], f[w]], {w, 69}]
    (* Second program: *)
    Map[Apply[LCM, #]/Apply[GCD, #] &@ Map[# - EulerPhi@ # &, #] &, Partition[Range[69], 2, 1]] (* Michael De Vlieger, Mar 17 2018 *)

Formula

a(n) = lcm(A051953(n), A051952(n+1))/gcd(A051953(n), A051952(n+1)) = lcm(cototient(n+1), cototient(n))/A049586(n).
Showing 1-5 of 5 results.