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 11-16 of 16 results.

A034934 Numbers k such that (3*k + 1)/2 is prime.

Original entry on oeis.org

1, 3, 7, 11, 15, 19, 27, 31, 35, 39, 47, 55, 59, 67, 71, 75, 87, 91, 99, 111, 115, 119, 127, 131, 151, 155, 159, 167, 171, 175, 179, 187, 195, 207, 211, 231, 235, 239, 255, 259, 267, 279, 287, 295, 299, 307, 311, 319, 327, 335, 339, 347, 371, 375, 379, 391
Offset: 1

Views

Author

Keywords

Comments

Related to hyperperfect numbers of a certain form.
The formula by Jaroslav Krizek is explained as follows: If p = (3n+1)/2 is prime, then it is an integer, and p must be of the form p = 3m-1, i.e., p = A003627(k). On the other hand, if p = A003627(k), then all k < p are coprime to p, so we have B(p) = (Sum_{kM. F. Hasler, Nov 29 2010

Examples

			a(6) = 19 because for A003627(6) = 29, B(29) = A053818(29)/A023896(29) = 7714/406 = 19. Cf. A179871-A179891, A003627, A007645. - _Jaroslav Krizek_, Aug 01 2010
		

Crossrefs

Programs

  • Magma
    [ n: n in [1..400 by 2] | IsPrime((3*n+1) div 2) ];
    
  • Mathematica
    Select[Range[500], PrimeQ[(3# + 1)/2] &] (* Harvey P. Dale, Jan 15 2011 *)
  • PARI
    is(n)=isprime((3*n+1)/2) \\ Charles R Greathouse IV, Feb 20 2017

Formula

a(n) = A175505(A003627(n)). - Jaroslav Krizek, Aug 01 2010

Extensions

Corrected by Vincenzo Librandi, Mar 24 2010

A128287 Nonprime numbers k such that k divides A014137(k).

Original entry on oeis.org

1, 8, 133, 49378
Offset: 1

Views

Author

Alexander Adamchuk, Feb 23 2007

Keywords

Comments

Prime p divides A014137(p) for p in A045309 (primes congruent to {0, 2} mod 3).
a(5) > 5000000. - Chai Wah Wu, Nov 13 2014

Examples

			1 is nonprime and divides A014137(1) = 2, so 1 is a term.
8 is nonprime and divides A014137(8) = 2056, so 8 is a term.
		

Crossrefs

Programs

  • Mathematica
    s = 1; Do[s = s + (2n)!/n!/(n+1)!; If[ !PrimeQ[n] && Mod[s, n] == 0, Print[n]], {n, 1000}]
  • Python
    from _future_ import division
    from sympy import isprime
    A128287_list, x, s = [1], 1, 2
    for i in range(2,10**5):
        x = x*(4*i-2)//(i+1)
        s += x
        if not (isprime(i) or s % i):
            A128287_list.append(i) # Chai Wah Wu, Nov 13 2014

Extensions

One more term from Ryan Propper, Apr 02 2007

A169618 Table with T(n,k) = the number of ways to represent k as the sum of a square and a cube modulo n.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 6, 6, 2, 2, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 11, 8, 12, 2, 6, 3, 12, 20, 4, 4, 12, 4, 4, 4, 15, 15, 6, 6, 6, 6, 6, 6, 15, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 18, 18, 6, 6, 18, 18, 6, 6, 18, 18, 6, 6, 13, 11, 18, 8, 20, 15, 6
Offset: 1

Views

Author

Keywords

Comments

The top left corner is T(1,0).
It appears that this table does not contain any 0's.
It appears that row n is constant iff n is squarefree, and no prime divisor of n is == 1 (mod 6). It is not hard to show that such rows are constant, since the cubes are equi-distributed in such moduli.

Examples

			The 6 ways to represent 0 (mod 4) are 0^2+0^3, 0^2+2^3, 1^2+3^3, 2^2+0^3, 2^2+2^3, and 3^2+3^3.
		

Crossrefs

Programs

  • PARI
    al(n)=local(v);v=vector(n);for(i=0,n-1,for(j=0,n-1,v[(i^2+j^3)%n+1]++));v

A216061 Primes p such that p^3 + p + 1 is prime.

Original entry on oeis.org

2, 3, 5, 17, 29, 41, 53, 71, 83, 131, 179, 191, 239, 263, 311, 389, 491, 509, 557, 569, 593, 653, 701, 719, 743, 797, 821, 863, 887, 953, 971, 977, 1019, 1049, 1097, 1109, 1277, 1301, 1319, 1373, 1427, 1481, 1523, 1559, 1601, 1607, 1613, 1667, 1787, 1823
Offset: 1

Views

Author

César Eliud Lozada, Aug 31 2012

Keywords

Crossrefs

Cf. A053182.
Subsequence of A045309.

Programs

  • Magma
    [p: p in PrimesUpTo(2000) | IsPrime(p^3+p+1)]; // Bruno Berselli, Sep 01 2012
  • Maple
    A := {}; for n to 1000 do p := ithprime(n); if isprime(p^3+p+1) then A := `union`(A, {p}) end if end do; A := A
  • Mathematica
    Select[Prime[Range[400]], PrimeQ[#^3 + # + 1] &] (* Bruno Berselli, Sep 01 2012 *)

A308470 a(n) = (gcd(phi(n), 4*n^2 - 1) - 1)/2, where phi is A000010, Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 7, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 4, 7, 0, 1, 0, 0, 2, 0, 0, 0, 1, 3, 2, 0, 0, 1, 0, 2, 0, 4
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 29 2019

Keywords

Comments

2*a(n) + 1 = gcd(phi(2*n), (2*n - 1)*(2*n + 1)).
a(A000040(n)) = A099618(n).
Records occur at n = 1, 7, 22, 62, 172, 213, 372, 427, 473, ...

Examples

			a(7) = 1 because (gcd(phi(7), 4*7^2 - 1) - 1)/2 = (gcd(6, 195) - 1)/2 = (3 - 1)/2 = 1.
		

Crossrefs

Programs

  • Magma
    [(Gcd(EulerPhi(n),4*n^2-1)-1)/2: n in [1..95]];
    
  • Mathematica
    Table[(GCD[EulerPhi[n], 4n^2 - 1] - 1)/2, {n, 100}] (* Alonso del Arte, May 30 2019 *)
  • Python
    from math import gcd
    def A000010(n):
        if n == 1:
            return 1
        d, m = 1, 0
        while d < n:
            if gcd(d,n) == 1:
                m = m+1
            d = d+1
        return m
    n = 0
    while n < 30:
        n = n+1
        print(n,(gcd(A000010(n),4*n**2-1)-1)//2) # A.H.M. Smeets, Aug 18 2019

Formula

a(A000040(n)) = A099618(n).
a(A002476(n)) = 1.
a(A045309(n)) = 0.

A370268 Intersection of A189715 and A370267.

Original entry on oeis.org

1, 4, 6, 7, 9, 10, 15, 16, 22, 24, 25, 28, 31, 33, 36, 40, 42, 49, 54, 55, 58, 60, 63, 64, 70, 73, 79, 81, 87, 88, 90, 96, 97, 100, 103, 105, 106, 112, 118, 121, 124, 127, 132, 135, 144, 145, 150, 151, 154, 159, 160, 166, 168, 169, 175, 177, 186, 193, 196, 198, 199, 202, 214, 216, 217, 220, 223, 225, 231, 232, 240, 241, 247
Offset: 1

Views

Author

Peter Munn, Feb 13 2024

Keywords

Comments

A189715 and A370267 are closely related in that they may be generated by the same process, but starting from numbers of the form 6m+1 and 8m+1 respectively - see A370267 for details.
Independent definition: numbers with an even number of prime factors not of the form 3m+1 and an even number of prime factors not of the form 8m+-1 (counting repetitions).
The sequence starts with the first 72 nonzero numbers of the form x^2 + 6y^2 (see A002481). After the absence of 0, this sequence next differs from A002481 by including 247, 391, 442, ... . From these early intermittent differences, the densities of the two sequences diverge progressively, driven by the absence from A002481 of many of the squarefree composite numbers that are present here though their prime factors are not. (Both sequences are closed under multiplication.) Asymptotic densities are 1/4 and 0 respectively.
Likewise, if we list the even terms halved, we find a similar relationship to the nonzero terms of A002480. The first 66 terms match, then we find we have generated intermittent extra terms: 221, 299, 323, ... .
Numbers whose squarefree part is congruent to {1,7} mod 24, {10,22} mod 48, {15,33} mod 72, or {6,42} mod 144. (Each congruence describes a coset of A334832 under A059897(.,.) as described in A334832. This sequence corresponds to the subgroup of the quotient group generated by {6,7,10}.)

Crossrefs

Intersection of A189715 and A370267.
A002481\{0}, A334832 are subsequences.

Programs

  • PARI
    isok(k) = {c = core(k); c%24 == 1 || c%24 == 7 || c%48 == 10 || c%48 == 22 || c%72 == 15 || c%72 == 33 || c%144 == 6 || c%144 == 42}

Formula

{a(n) : n >= 1} = {A059897(i,j*k) : i in A334832, j in {1,7}, k in {1,6,10,15}}.
Previous Showing 11-16 of 16 results.