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

A161187 Let S = A089237\{0} = union of primes and nonzero squares; sequence gives indices of squares.

Original entry on oeis.org

1, 4, 7, 10, 14, 17, 22, 26, 31, 35, 41, 46, 52, 58, 63, 70, 78, 84, 91, 98, 106, 114, 122, 129, 139, 148, 156, 165, 175, 184, 193, 204, 214, 225, 235, 246, 256, 266, 279, 291, 304, 316, 326, 339, 351, 365, 376, 390, 406, 417, 429, 445, 462, 475, 489, 501, 514
Offset: 1

Views

Author

Daniel Tisdale, Jun 06 2009

Keywords

Crossrefs

Cf. A089237. Complement of A161188.
Cf. A050052.

Programs

  • Haskell
    a161187 n = a161187_list !! (n-1)
    a161187_list = tail $ findIndices ((== 1) . a010052) a089237_list
    -- Reinhard Zumkeller, Dec 18 2012
    
  • Magma
    [1] cat [#PrimesUpTo(n^2-1)+n: n in [2..100]]; // Vincenzo Librandi, Feb 18 2016
    
  • Mathematica
    Table[PrimePi[n^2 - 1] + n, {n, 60}] (* Vincenzo Librandi, Feb 18 2016 *)
  • Python
    from sympy import primepi
    def A161187(n): return n+primepi(n**2) # Chai Wah Wu, Oct 12 2024

Formula

A089237(a(n)+1) = A000290(n). - Reinhard Zumkeller, Dec 18 2012

Extensions

Edited by N. J. A. Sloane, Jun 07 2009
Extended by Ray Chandler, May 06 2010

A161188 Let S = A089237\{0} = union of primes and nonzero squares; sequence gives indices of primes.

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89
Offset: 1

Views

Author

Daniel Tisdale, Jun 06 2009

Keywords

Crossrefs

Cf. A089237. Complement of A161187.
Cf. A050051.

Programs

  • Haskell
    a161188 n = a161188_list !! (n-1)
    a161188_list = map (+ 1) $ findIndices ((== 1) . a010051) $ tail a089237_list
    -- Reinhard Zumkeller, Dec 18 2012
    
  • Python
    from math import isqrt
    from sympy import prime
    def A161188(n): return n+isqrt(prime(n)) # Chai Wah Wu, Oct 12 2024

Formula

A089237(a(n)+1) = A000040(n). - Reinhard Zumkeller, Dec 18 2012
a(n) = floor(sqrt(prime(n))) + n. - Ilya Gutkovskiy, Feb 16 2017

Extensions

Edited by N. J. A. Sloane, Jun 07 2009
Extended by Ray Chandler, May 06 2010

A089229 Neither primes nor square numbers.

Original entry on oeis.org

6, 8, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 102, 104, 105, 106
Offset: 1

Views

Author

Roger L. Bagula, Dec 10 2003

Keywords

Comments

Also, composites with an even number of divisors. - Juri-Stepan Gerasimov, Jul 17 2009

Crossrefs

Complement of A089237.

Programs

  • Haskell
    a089229 n = a089229_list !! (n-1)
    a089229_list = f a018252_list $ tail a000290_list where
       f (u:us) vs'@(v:vs) = if u < v then u : f us vs' else f us vs
    -- Reinhard Zumkeller, Jul 07 2014
    
  • Magma
    [n: n in [1..200] | not IsSquare(n) and not IsPrime(n)]; // Vincenzo Librandi, Jun 14 2016
    
  • Mathematica
    m=100;Complement[Range[0,m^2],Range[0,m]^2,Prime[Range[PrimePi[m^2]]]] (* Zak Seidov, Dec 12 2011*)
  • PARI
    lista(nn) = for (n=1, nn, if (!issquare(n) && !isprime(n), print1(n, ", "))); \\ Michel Marcus, Jun 01 2015
    
  • PARI
    is(n)=!issquare(n) && !isprime(n) \\ Charles R Greathouse IV, Oct 19 2015
    
  • Python
    from math import isqrt
    from sympy import primepi
    def A089229(n):
        def f(x): return int(n+primepi(x)+isqrt(x))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Oct 12 2024

Formula

(1 - A010051(a(n))) * (1 - A010052(a(n))) = 1. - Reinhard Zumkeller, Jul 07 2014

A340389 Number at the apex of Recamán's triangle of primes and squares with n rows.

Original entry on oeis.org

0, 3, 9, 59, 1669, 147456, 60924257
Offset: 1

Views

Author

Sean A. Irvine, Apr 24 2021

Keywords

Comments

Form a triangle of n rows and place a distinct prime or square at each position such that (apart from the bottom row) every number is the sum of the two numbers below it, and such that the number at the apex is as small as possible.

Examples

			n=3:
    9
   4 5
  1 3 2
.
n=4:
        59
      23  36
    16   7  29
  13   3   4  25
.
n=5 (B. Mehta):
             1669
           576  1093
        383   193   900
     347    36   157   743
  324    23    13   144   599
.
n=6 (_Sean A. Irvine): _
                     147456
                  63487   83969
              33211   30276   53693
          17424   15787   14489   39204
      10853    6571    9216    5273   33931
  10529     324    6247    2969    2304   31627
.
From _Bert Dobbelaere_, May 11 2021: (Start)
n=7:
                             60924257
                        21861757  39062500
                    7799257  14062500  25000000
               2736757   5062500   9000000  16000000
           914257   1822500   3240000   5760000  10240000
      258157    656100   1166400   2073600   3686400   6553600
  21961    236196    419904    746496   1327104   2359296   4194304
(End)
		

References

  • Bernardo Recamán, The Bogotá Puzzles, Dover Publications, 2020, Puzzle 3, p. 3.

Crossrefs

Cf. A089237 (primes and squares).

Programs

  • PARI
    see LINKS

Extensions

a(7) from Bert Dobbelaere, May 11 2021

A376471 Lexicographically earliest strictly increasing sequence of numbers whose partial products are all exponentially 2^n-numbers (A138302).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 11, 13, 17, 19, 20, 23, 25, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 77, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 208, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Amiram Eldar, Sep 24 2024

Keywords

Comments

All the primes are terms.

Examples

			1 * 2 = 2^1 and 1 = 2^0.
1 * 2 * 3 = 6 = 2^1 * 3^1 and 1 = 2^0.
1 * 2 * 3 * 5 * 6 = 180 = 2^2 * 3^2 * 5^1, 1 = 2^0 and 2 = 2^1.
		

Crossrefs

Disjoint union of A000040 and A376472.
Similar sequences:
Sequence | Partial products are in | Exponents are in
--------------+-------------------------+------------------------
A050376 | A037992 | A000225 \ {0} (2^n-1)
A089237 | A268335 | A005408 (odd numbers)
{1} U A246551 | A246551 | A000290 \ {0} (squares)
this sequence | A138302 | A000079 (powers of 2)

Programs

  • Mathematica
    expPow2Q[n_] := AllTrue[FactorInteger[n][[;; , 2]], # == 2^IntegerExponent[#, 2] &]; a[1] = 1; a[n_] := a[n] = Module[{prod = Times @@ Array[a, n - 1], k = a[n - 1] + 1}, While[! expPow2Q[prod*k], k++]; k]; Array[a, 100]
  • PARI
    ispow2(n) = if(n == 0, 1, n >> valuation(n, 2) == 1);
    lista(pindmax) = {my(pmax = prime(pindmax), v = vector(pindmax), f, pind, prd); print1(1, ", "); for(k = 2, pmax, f = factor(k); pind = apply(x -> primepi(x), f[,1]); for(i = 1, #pind, v[pind[i]] += f[i, 2]); if(vecprod(apply(x -> ispow2(x), v)) > 0, print1(k, ", "), for(i = 1, #pind, v[pind[i]] -= f[i, 2])));}

A202137 Numbers k such that 24k + 1 is neither square nor prime.

Original entry on oeis.org

6, 9, 11, 16, 20, 21, 23, 27, 29, 30, 31, 33, 34, 36, 37, 38, 41, 44, 45, 46, 49, 53, 56, 58, 59, 60, 61, 63, 64, 65, 66, 68, 71, 72, 76, 79, 80, 81, 82, 85, 86, 91, 93, 94, 96, 97, 98, 101, 102, 104, 106, 107, 110, 111, 114, 115, 116, 120, 121, 122, 124
Offset: 1

Views

Author

Zak Seidov, Dec 15 2011

Keywords

Comments

Conjecture: sequence contains arbitrarily long runs of consecutive integers.
First runs with lengths 1..4 are 6; 20, 21; 29, 30, 31; 58, 59, 60, 61.
Records in run lengths are 1, 2, 3, 4, 5, 6, 7, 9, 13, 17, 20, 23, 32, 33, 36, 40, 41, 43, 48, 49, 52, 69, 77, 89, 97, 99, 108, 126, 135, 148, 149
with corresponding first terms of runs: 6, 20, 29, 58, 148, 163, 378, 449, 936, 1675, 5740, 7075, 15915, 35545, 112303, 229944, 469454, 628921, 775480, 902518, 1003826, 1208039, 12542948, 29223210, 33015691, 224430268, 260333109, 530363391, 3713119689, 7962252405, 9312173798.
Conjecture is easy to prove using the Chinese Remainder Theorem and the fact that the gaps between squares grow. - Robert Israel, Jan 25 2018

Crossrefs

Cf. A089237 (list of primes and squares), A089229 (neither primes nor squares).

Programs

  • Magma
    [n: n in [1..200] | not IsSquare(24*n+1) and not IsPrime(24*n+1)]; // Vincenzo Librandi, Jan 26 2018
  • Maple
    filter:= n -> not issqr(24*n+1) and not isprime(24*n+1):
    select(filter, [$1..200]); # Robert Israel, Jan 25 2018
  • Mathematica
    Select[Range[150],!PrimeQ[24#+1]&&!IntegerQ[Sqrt[24#+1]]&] (* Harvey P. Dale, Dec 01 2015 *)
  • PARI
    for(n=1,200,m=24*n+1;if(isprime(m)+issquare(m),,print1(n",")))
    
Showing 1-6 of 6 results.