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.

Previous Showing 71-78 of 78 results.

A344148 Primes which are two greater than A191746 terms.

Original entry on oeis.org

17, 6779, 293617, 2992417, 24101863, 423722581, 625997497, 929306267, 3377032037, 3825265007, 6458885659, 7150892197, 13075407803, 13860035251, 19434399319, 32531231209, 47475445333, 50281049527, 53207636077, 62607479491, 85780812151, 106014038789, 109384656937, 121991823731, 125813698531
Offset: 1

Views

Author

Hartmut F. W. Hoft, May 10 2021

Keywords

Comments

Among numbers a(1..564) are 38 twin primes of which 14 are twins to numbers in A344147 with the first of the latter pairs being A344147(16)=85780812149 and a(21)=85780812151. In contrast it appears that A097490, A097491, A097493 and A343778 contain only twin prime numbers from the set {5, 7, 17}.

Examples

			a(1)=17=A191746(1)+2 is the first prime and a(2)=6779=A191746(7)+2 is the second of the form A191746(k)+2; both are twin primes while a(3)=293617 is not.
		

Crossrefs

Programs

  • Mathematica
    (* function a191746[ ] is defined in A344147 *)
    a344148[n_] := Select[a191746[n] + 2, PrimeQ]
    a344148[500]

A357928 a(n) is the smallest c for which (s+c)^2-n is a square, where s = floor(sqrt(n)), or -1 if no such c exists.

Original entry on oeis.org

0, 0, -1, 1, 0, 1, -1, 2, 1, 0, -1, 3, 1, 4, -1, 1, 0, 5, -1, 6, 2, 1, -1, 8, 1, 0, -1, 1, 3, 10, -1, 11, 1, 2, -1, 1, 0, 13, -1, 2, 1, 15, -1, 16, 6, 1, -1, 18, 1, 0, -1, 3, 7, 20, -1, 1, 2, 4, -1, 23, 1, 24, -1, 1, 0, 1, -1, 26, 10, 5, -1, 28, 1, 29, -1, 2, 12, 1, -1, 32
Offset: 0

Views

Author

Darío Clavijo, Oct 20 2022

Keywords

Comments

c exists iff n != 2 (mod 4), and it allows n to be written as the difference of two perfect squares.
This gives a factorization n = x*y where x and y may or may not be primes: let s = floor(sqrt(n)), u = a(n) + s and v = u^2 - n; then w = sqrt(v), x = u - w, y = u + w and x*y == n.
The Fermat factorization algorithm seeks such a form, starting from s, so that a(n) is the number of steps it must take for n != 2 (mod 4).
a(n) >= 1 if n is not square and is writable as a difference of squares.
a(n) = 0 if n is square.
a(n) = -1 if n is not writable as a difference of squares.

Examples

			n   prime  square  n == 2 (mod 4)   c   s  v=(s+c)^2-n   u   w   x   y  x*y
--  -----  ------  --------------  --  --  -----------  --  --  --  --  ---
76      F       F               F  12   8          324  20  68   2  38   76
13      T       F               F   4   3           36   7   6   1  13   13
25      F       T               F   0   0            0   5   0   5   5   25
7       T       F               T  -1   -            -   -   -   -   -    -
		

Crossrefs

Programs

  • PARI
    a(n) = if ((n%4)==2, -1, my(s=sqrtint(n), c=0); while (!issquare((s+c)^2-n), c++); c); \\ Michel Marcus, Oct 24 2022
  • Python
    from gmpy2 import *
    def fermat(n):
        a, rem = isqrt_rem(n)
        b2 = -rem
        c0 = (a << 1) + 1
        c = c0
        while not is_square(b2):
            b2 += c
            c += 2
        return (c-c0) >> 1
    def A357928(n):
      if is_square(n):
          return 0
      elif ((n-2) % 4) != 0:
          return fermat(n)
      else:
          return -1
    
  • Python
    from math import isqrt
    from itertools import takewhile
    from sympy import divisors
    def A357928(n): return -1 if n&3==2 else min((m>>1 for d in takewhile(lambda d:d**2<=n,divisors(n)) if not((m:=n//d+d) & 1)),default=0) - isqrt(n) # Chai Wah Wu, Oct 26 2022
    

A135285 Sum of staircase twin primes according to the rule: top * bottom - next top.

Original entry on oeis.org

10, 24, 126, 294, 858, 1704, 3528, 5082, 10296, 11526, 18894, 22320, 32208, 36666, 38976, 51744, 57330, 72618, 79212, 96996, 120684, 175968, 186162, 212922, 271914, 324300, 359382, 381282, 411504, 434790, 655278, 674856, 684726, 735282, 776904
Offset: 1

Views

Author

Cino Hilliard, Dec 03 2007

Keywords

Comments

While there is multiplication and subtraction in the generation of this sequence, it is still called a sum because the arithmetic processes -,*,/ are derived from addition.

Programs

  • PARI
    g(n) = for(x=1,n,y=twinu(x) * twinl(x) - twinl(x+1);print1(y",")) twinl(n) = / *The n-th lower twin prime. */ { local(c,x); c=0; x=1; while(c
    				

Formula

We list the twin primes in staircase fashion as in A135283. Then a(n) = tl(n) * tu(n) + (-tl(n+1)).
a(n) = A037074(n) -A001359(n+1). - R. J. Mathar, Sep 10 2016

A135286 Sum of staircase twin primes according to the rule: top * bottom + next top.

Original entry on oeis.org

20, 46, 160, 352, 940, 1822, 3670, 5284, 10510, 11800, 19192, 22678, 32590, 37060, 39430, 52222, 57868, 73180, 79834, 97690, 121522, 176830, 187084, 213964, 273052, 325498, 360616, 382564, 412822, 436408, 656920, 676510, 686440, 737044, 778942, 1041430, 1066072, 1103560, 1128934, 1193614, 1328332, 1514176, 1634572, 1665400, 1696522, 1743826, 2040634, 2109784, 2197810, 2215750
Offset: 1

Views

Author

Cino Hilliard, Dec 03 2007

Keywords

Comments

While there is multiplication in the generation of this sequence, it is still called a sum because the arithmetic processes -,*,/ are derived from addition.

Programs

  • PARI
    g(n) = for(x=1,n,y=twinu(x) * twinl(x) + twinl(x+1);print1(y",")) twinl(n) = / *The n-th lower twin prime. */ { local(c,x); c=0; x=1; while(c
    				

Formula

We list the twin primes in staircase fashion as in A135283. Then a(n) = tl(n) * tu(n) + tl(n+1).
a(n) = A037074(n)+A001359(n+1). - R. J. Mathar, Sep 10 2016

Extensions

All the entries were wrong. They have been corrected by Franklin T. Adams-Watters, Apr 29 2008

A167283 Products of distinct isolated primes.

Original entry on oeis.org

46, 74, 94, 106, 134, 158, 166, 178, 194, 226, 254, 262, 314, 326, 334, 346, 422, 446, 466, 502, 514, 526, 554, 586, 614, 634, 662, 674, 706, 718, 734, 746, 758, 766, 778, 794, 802, 818, 851, 878, 886, 898, 914, 934, 958, 974, 982, 998, 1006, 1018, 1081, 1082
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 01 2009, Nov 02 2009

Keywords

Comments

Numbers of the form A007510(i)*A007510(j), i <> j.

Examples

			a(50) = 1081 because 23*37 = 1081, where 23 is the 2nd non-twin prime and 37 is the 3rd non-twin prime.
		

Crossrefs

Extensions

Definition clarified and 851 inserted by R. J. Mathar, May 21 2010

A342870 a(n) is the number of twin primes between A001359(n)^2 and A001359(n)*(A001359(n)+1).

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 2, 1, 2, 2, 0, 2, 4, 1, 1, 1, 5, 1, 3, 4, 2, 5, 4, 2, 4, 3, 6, 6, 3, 5, 6, 6, 4, 6, 4, 7, 9, 6, 8, 9, 6, 8, 10, 6, 11, 9, 13, 8, 12, 6, 14, 4, 7, 11, 11, 15, 9, 10, 12, 11, 10, 12, 13, 8, 15, 14, 11, 12, 9, 11, 15, 14, 18, 16, 11, 18, 10
Offset: 1

Views

Author

Zhandos Mambetaliyev, Mar 28 2021

Keywords

Crossrefs

Programs

  • PARI
    {for(k=1, 400, if(prime(k+1)-prime(k)==2, my(c=0); forprime(m=prime(k)^2, prime(k)*(prime(k)+1), c+=isprime(m+2)); print1(c, ", ")))}

A358043 Numbers k such that phi(k) is a multiple of 8.

Original entry on oeis.org

15, 16, 17, 20, 24, 30, 32, 34, 35, 39, 40, 41, 45, 48, 51, 52, 55, 56, 60, 64, 65, 68, 70, 72, 73, 75, 78, 80, 82, 84, 85, 87, 88, 89, 90, 91, 95, 96, 97, 100, 102, 104, 105, 110, 111, 112, 113, 115, 116, 117, 119, 120, 123, 128, 130, 132, 135, 136, 137, 140, 143
Offset: 1

Views

Author

Darío Clavijo, Oct 26 2022

Keywords

Crossrefs

Cf. A000010 (phi), A053574 (its 2-adic valuation), A037074 (a subsequence).
Totient multiples: A066498 (3), A172019 (4), A066500 (5), A066502 (7), A332512 (12).

Programs

  • Mathematica
    Select[Range[150], Divisible[EulerPhi[#], 8] &] (* Amiram Eldar, Oct 27 2022 *)
  • PARI
    isok(k) = Mod(eulerphi(k), 8) == 0; \\ Michel Marcus, Oct 27 2022
  • Python
    from sympy.ntheory import totient
    def isok(n): return totient(n) % 8 == 0
    

Formula

A000010(a(n)) == 0 (mod 8).

A373899 Semiprimes q*p such that q^p == p (mod (q - p)), where q > p.

Original entry on oeis.org

6, 15, 21, 33, 35, 55, 65, 77, 85, 91, 133, 143, 145, 155, 161, 187, 209, 217, 221, 247, 253, 265, 299, 301, 323, 341, 377, 391, 403, 415, 437, 451, 481, 493, 533, 545, 551, 553, 559, 581, 589, 611, 629, 667, 671, 689, 697, 703, 713, 781, 793, 799, 817, 893, 899, 901
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 22 2024

Keywords

Examples

			15 = 3*5 is a term because 5^3 == 3 (mod 2).
		

Crossrefs

Subsequence of A001358.
Cf. A037074 (subsequence), A046388, A371811.

Programs

  • Mathematica
    seqQ[n_] := Module[{f = FactorInteger[n], p, q}, If[f[[;; , 2]] == {1, 1}, p = f[[1, 1]]; q = f[[2, 1]]; PowerMod[q, p, q - p] == Mod[p, q - p], False]]; Select[Range[1000], seqQ] (* Amiram Eldar, Jun 26 2024 *)
Previous Showing 71-78 of 78 results.