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.

User: Brad Clardy

Brad Clardy's wiki page.

Brad Clardy has authored 62 sequences. Here are the ten most recent ones:

A252944 Fermat pseudoprimes that are not Carmichael numbers and have only composite XOR couples as defined in A182108.

Original entry on oeis.org

23377, 31417, 49981, 74665, 220729, 435671, 679729, 769757, 852481, 915981, 1016801, 1023121, 1128121, 1397419, 2008597, 2987167, 3073357, 4014361
Offset: 1

Author

Brad Clardy, Dec 25 2014

Keywords

Comments

There are 433 Fermat pseudoprimes that aren't Carmichael numbers below 2^22, but only 18 have this property. Carmichael numbers that have this property are in A182116.

Crossrefs

Programs

  • Magma
    function IsClardynum(X, i)
      if i eq 1 then
        return true;
      else
        xornum:=2^i - 2;
        xorcouple:=BitwiseXor(X, xornum);
        if (IsPrime(xorcouple)) then
           return false;
        else
           return IsClardynum(X, i-1);
        end if;
      end if;
    end function;
    for n:= 3 to 1052503 by 2 do
      if (IsOne(2^(n-1) mod n)
          and not IsPrime(n)
          and not n mod CarmichaelLambda(n) eq 1
          and IsClardynum(n,Ilog2(n)))
          then n;
      end if;
    end for;

A252943 Number of Fermat pseudoprimes to base 2 between 2^n and 2^(n+1) that are not Carmichael numbers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 5, 10, 12, 14, 21, 31, 41, 64, 100, 127, 165, 216, 288, 397, 572, 723, 955, 1344, 1793, 2399, 3280, 4228, 5728, 7738, 10223, 13895, 18324, 24437, 33007, 43850, 58173, 77938, 104689, 139195, 187497, 252020, 337731, 452631, 606942
Offset: 1

Author

Brad Clardy, Dec 25 2014

Keywords

Comments

This is a count, by power-of-two intervals, of the number of Fermat pseudoprimes that are not Carmichael numbers. A182490 contains the count of Carmichael numbers by power-of-two intervals.

Crossrefs

Programs

  • Magma
    // Fermat pseudoprimes that are not Carmichael numbers,
    // count by power of two intervals
    for i:= 1 to 20 do
      isum:=0;
      for n:= 2^i + 1 to 2^(i+1) - 1 by 2 do
         if (IsOne(2^(n-1) mod n)
               and not IsPrime(n)
               and not n mod CarmichaelLambda(n) eq 1)
               then isum:=isum+1;
         end if;
      end for;
      i,isum;
    end for;

Extensions

a(21) from Jon E. Schoenfield, Dec 25 2014
a(22)-a(50) from Daniel Suteu, Mar 06 2023

A247607 Primes whose number of symmetric connections to other primes within the same power of two interval exceeds the number of symmetric connections to composites.

Original entry on oeis.org

5, 7, 17, 19, 29, 31, 43, 59, 103, 281, 457, 461, 463, 499, 607, 1409, 1451, 2143, 2657, 4229, 16063, 19583, 19699, 62143, 65537, 70919, 107347, 113159, 124783, 124981, 600703, 3103423, 18936719
Offset: 1

Author

Brad Clardy, Sep 22 2014

Keywords

Comments

While there may be some additional terms, it is thought to be a finite sequence. An exhaustive search was conducted up to 2^29.
Members larger than 2^8 will also be in A200321.

Examples

			In the interval (2^4,2^5) [17,19,21,23,25,27,29,31], the prime 17 symmetrically couples with 31 around the midpoint of the interval, 23 around the midpoint of the halved interval, and 19 in the quartered interval. There is no composite couple. It has 3 prime and 0 composite symmetric connections. The same process for 19 produces 2 prime and 1 composite connection. Therefore 17 and 19 are members. 23 couples with 25, 17 and 22. It has 1 prime and 2 composite connections so it is not a member.
		

Crossrefs

Cf. A200231.

Programs

  • Magma
    XOR := func;
    function PCcoord(X,i,P,C)
    if (i eq 1) then
        if (P gt C) then return true;
          else
          return false,P,C;
        end if;
      else
        xornum:=2^i - 2;
        xorcouple:=XOR(X, xornum);
        if (IsPrime(xorcouple)) then
           return PCcoord(X, i-1,P+1,C);
        else
           return PCcoord(X, i-1,P,C+1);
        end if;
      end if;
    end function;
    for k:= 1 to 2^10 + 1 by 2 do
      if IsPrime(k) then
         if PCcoord(k,Ilog2(k),0,0) then k;
         end if;
      end if;
    end for;

A242435 Number of terms of A182116 between 2^n and 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 2, 6, 2, 7, 8, 6, 12, 11, 21, 24, 27, 35, 45, 68, 86, 117, 176, 206, 260, 370, 457, 565, 750, 967, 1321, 1531, 1978, 2842, 3723, 4587, 5677, 8354, 10708, 13435, 17259, 23040, 31741, 40146, 48596, 66728, 92193, 112771, 149002, 209890
Offset: 1

Author

Brad Clardy, May 14 2014

Keywords

Comments

This was done with data on Carmichael numbers below 10^21 provided by R. G. E. Pinch, and special computational assistance from William Stein.
There are 16396564 Carmichael numbers below 2^69 but only 849752 have the property of A182116. It looks as though the ratio of Carmichael numbers of this type to normal Carmichael numbers converges to a value around 0.051.

Crossrefs

A225822 Lesser of adjacent odd numbers with different parity of binary weight and both isolated from odd numbers of same parity of binary weight.

Original entry on oeis.org

7, 23, 31, 39, 55, 71, 87, 95, 103, 119, 127, 135, 151, 159, 167, 183, 199, 215, 223, 231, 247, 263, 279, 287, 295, 311, 327, 343, 351, 359, 375, 383, 391, 407, 415, 423, 439, 455, 471, 479, 487, 503, 511, 519, 535, 543, 551, 567, 583, 599, 607, 615, 631
Offset: 1

Author

Brad Clardy, Jul 30 2013

Keywords

Comments

Write the sequence of odious odd numbers above the sequence of evil odd numbers connecting all that are 2 apart:
1 7 11-13 19-21 25 31 35-37 41 47-49 55 59-61 67-69 73 79-81 87 91-93 97
3-5 9 15-17 23 27-29 33 39 43-45 51-53 57 63-65 71 75-77 83-85 89 95 99-
Remove the connected numbers:
1 7 25 31 41 55 73 87 97
9 23 33 39 57 71 89 95
Define these as "isolated".
The sequence is the smaller of the remaining pairs that are 2 apart.
The 1 is not a member since there is no change in parity between 1 and 7.
All of the differences between adjacent numbers in both the evil and odious sequences are either 2, 4 or 6, with 4 being the indicator that a transition in parity occurs. The program provided utilizes that fact to produce the sequence.
The sequence that includes all numbers along this path is A047522 (numbers congruent to {1,7} mod 8). This is also the same as the odd terms of A199398 (XOR of the first n odd numbers).
This sequence is similar to A044449 (numbers n such that string 1,3 occurs in the base 4 representation of n but not of n+1), but it contains additional terms. An example is 119. Its base 4 representation is 1313 while the base 4 representation of 120 is 1320. It may be that another workable definition of the sequence is -- numbers n in base 4 representation such that string 1,3 occurs one less time in n+1 than n, but I have not been able to check this.
The difference between the numbers in the sequence is always either 8 or 16, however there appears to be no recurring repetitions in it. Writing the 8 as a 0 and the 16 as a 1 (or dividing the difference pattern by 2 and subtracting a 1) produces a difference pattern of: 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1... which is an infinite word.
A similar process writing Even Odious over Even Evils produces 6, 22, 30, 38, 54, 70... which is twice A131323 (Odd numbers n such that the binary expansion ends in an even number of 1's), with all numbers along the path given by A047451 (numbers congruent to {0,6} mod 8) and yields the same difference pattern which produces the same infinite word.

Crossrefs

Cf. A001969 (evil numbers), A129771 (odd evil numbers).
Cf. A000069 (odious numbers), A092246 (odd odious numbers).
Cf. A047522 (numbers congruent to {1,7} mod 8).
Cf. A199398 (XOR of first n odd numbers).
Cf. A044449 (a subset of this sequence).
Cf. A131323 (odd numbers n such that the binary expansion ends in an even number of 1's).
Cf. A047451 (numbers congruent to {0,6} mod 8).
Cf. A000120 (binary weight of n).
Cf. A079523.

Programs

  • Magma
    //Function Bweight calculates the binary weight of an integer
    Bweight := function(m)
    Bweight:=0;
    adigs := Intseq(m,2);
    for n:= 1 to Ilog2(m)+1 do
      Bweight:=Bweight+adigs[n];
    end for;
    return Bweight;
    end function;
    prevodi:=0;
    currodi:=0;
    m:=0;
    count:=0;
    for n:= 1 to 20000 by 2 do
        m:=m+1;
        if (Bweight(n) mod 2 eq 1) then odious:=true; else odious:=false; end if;
        if (odious) then currodi:=n; end if;
           if (currodi - prevodi eq 4) then
              if (m mod 2 eq 1) then count:=count+1; count,n-2;
                 else count:=count+1;count,n-4;
           end if;
        end if;
        if(odious) then prevodi:=currodi; end if;
    end for;
    
  • Mathematica
    2*Select[Range[1, 320, 2], EvenQ[IntegerExponent[# + 1, 2]] &] + 1 (* Amiram Eldar, Jul 24 2023 *)
  • PARI
    is(n)=n%4==3 && valuation(n\4+1, 2)%2 \\ Charles R Greathouse IV, Aug 20 2013
    
  • Python
    from itertools import count, islice
    def A225822_gen(startvalue=1): # generator of terms >= startvalue
        return map(lambda m:(m<<1)+1,filter(lambda n:n&1 and not (~(n+1)&n).bit_length()&1,count(max(startvalue,1))))
    A225822__list = list(islice(A225822_gen(),30)) # Chai Wah Wu, Jul 09 2022

Formula

a(n) = 2*A131323(n) + 1.
a(n) = 4*A079523(n) + 3. - Charles R Greathouse IV, Aug 20 2013
a(n) ~ 12n. (In particular, a(n) = 12n + O(log n).) - Charles R Greathouse IV, Aug 20 2013

A225781 Numbers k such that both k and (k+1)/2 are primes and evil.

Original entry on oeis.org

5, 277, 673, 1093, 1237, 1381, 1621, 1873, 2473, 2593, 2797, 2857, 4177, 4357, 4441, 4561, 4933, 5077, 5233, 5413, 5437, 5581, 5701, 6037, 6133, 6997, 7477, 7537, 8053, 8353, 8713, 8893, 9133, 9901, 10861, 10957, 11113, 11161, 11497, 12073, 12457, 12757
Offset: 1

Author

Brad Clardy, May 15 2013

Keywords

Comments

It seems to be the case that all primes k where (k+1)/2 is also prime share the property that they are also both either evil or odious, the sole exception being 3, which is evil but has 2 as an odious companion.
The last comment is true; for k and (k+1)/2 to be prime, k must be the number 3 or have the form 4*m + 1. The latter means its binary expansion ends in 01. Adding 1 to such a number and dividing by 2 leaves the bit count the same. Hence, both of these numbers have the same parity; they are both evil or both odious. - Jon Perry, May 25 2013

Crossrefs

Cf. A005383 (both k and (k+1)/2 are primes), A001969 (evil numbers).

Programs

  • Magma
    //the function Bweight determines the binary weight of a number
    Bweight := function(m)
    Bweight:=0;
    adigs := Intseq(m,2);
    for n:= 1 to Ilog2(m)+1 do
      Bweight:=Bweight+adigs[n];
    end for;
    return Bweight;
    end function;
    for i:=1 to 1000000 do
    pair:=(i+1)div 2;
      if (IsPrime(i) and IsPrime(pair) and (Bweight(i) mod 2 eq 0) and     (Bweight(pair) mod 2 eq 0)) then i;
      end if;
    end for;
  • Mathematica
    evilQ[n_] := EvenQ[DigitCount[n, 2, 1]]; Select[Prime[Range[1600]], PrimeQ[(#+1)/2] && And @@ evilQ /@ {#, (#+1)/2} &] (* Amiram Eldar, Aug 06 2023 *)

A225214 Primes of the form (2^n - 1)*(2^(m+3)) + 5 where n >= 1, m >= 1.

Original entry on oeis.org

37, 53, 101, 197, 229, 389, 773, 997, 1013, 2053, 8069, 14341, 15877, 32261, 49157, 57349, 63493, 65029, 65413, 196613, 261637, 262133, 524261, 1015813, 1048517, 1048549, 1572869, 2064389, 2095109, 4063237, 4192261, 4194181, 4194277, 8388581, 12582917
Offset: 1

Author

Brad Clardy, May 02 2013

Keywords

Comments

These are the primes arising in A224701.

Crossrefs

Cf. A224701.

A224701 Table read by antidiagonals of numbers of form (2^n - 1)*2^(m+3) + 5 where n>=1, m>=1.

Original entry on oeis.org

21, 37, 53, 69, 101, 117, 133, 197, 229, 245, 261, 389, 453, 485, 501, 517, 773, 901, 965, 997, 1013, 1029, 1541, 1797, 1925, 1989, 2021, 2037, 2053, 3077, 3589, 3845, 3973, 4037, 4069, 4085, 4101, 6149, 7173, 7685, 7941, 8069, 8133, 8165, 8181, 8197, 12293, 14341, 15365, 15877, 16133
Offset: 1

Author

Brad Clardy, Apr 16 2013

Keywords

Comments

The table has row labels 2^n - 1 and column labels 2^(m+3). The table entry is row*col + 5. A MAGMA program is provided that generates the numbers in a table format. The sequence is read along the antidiagonals starting from the top left corner. Using the lexicographic ordering of A057555 the sequence is:
A(n) = Table(i,j) with (i,j)=(1,1),(1,2),(2,1),(1,3),(2,2),(3,1)...
+5 | 16 32 64 128 256 512 1024 ...
----|-------------------------------------------
1 | 21 37 69 133 261 517 1029
3 | 53 101 197 389 773 1541 3077
7 | 117 229 453 901 1797 3589 7173
15 | 245 485 965 1925 3845 7685 15365
31 | 501 997 1989 3973 7941 15877 31749
63 | 1013 2021 4037 8069 16133 32261 64517
127 | 2037 4069 8133 16261 32517 65029 130053
...
All of these numbers have the following property: let m be a member of A(n); if a sequence B(n) = all i such that i XOR (m - 1) = i - (m - 1), then the differences between successive members of B(n) is a repeating series
of 1,1,1,5 ending with 1,1,1 and the last difference in the pattern m. The total number of 1's and 5's in the pattern is 2^(j+2) - 1, where j is the column index.
As an example, consider A(1), which is 21; the sequence B(n) where i XOR 20 = i - 20 starts as 20, 21, 22, 23, 28, 29, 30, 31, 52, ... with successive differences of 1, 1, 1, 5, 1, 1, 1, 21.
for A(2), which is 37, the sequence B(n) where i XOR 36 = i - 36 starts as 36, 37, 38, 39, 44, 45, 46, 47, 52, 53, 54, 55, 60, 61, 62, 63, 100, ... with successive differences of 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 37.

Crossrefs

Cf. A057555 (lexicographic ordering).
Rows: A168614(i=1), n>=4.
Cols: A220087(j=2), n>=6.

Programs

  • Magma
    //program generates values in a table form, row labels of 2^i -1
    for i:=1 to 10 do
        m:=2^i - 1;
        m, [ m*2^(n+3) +5 : n in [1..10]];
    end for;
    //program generates sequence in lexicographic ordering of A057555, read
    //along antidiagonals from top. Primes in the sequence are marked with *.
    for i:=2 to 18 do
        for j:=1 to i-1 do
           m:=2^j -1;
           k:=m*2^(3+i-j) + 5;
           if IsPrime(k) then k, "*";
              else k;
           end if;
        end for;
    end for;

Formula

a(n) = 2^(A057555(2*n - 1))*2^(A057555(2*n) + 3) + 5 for n>=1.

A224383 Primes of the form (2^n - 1)*(2^(m+2)) + 3 where n >= 1, m >= 1.

Original entry on oeis.org

11, 19, 59, 67, 131, 227, 251, 499, 1019, 1987, 4091, 4099, 8179, 32707, 32771, 57347, 65027, 65539, 114691, 130051, 131011, 131059, 262139, 262147, 507907, 1040387, 1048571, 2097091, 4161539, 8372227, 8388547, 14680067, 16744451, 33538051, 33554371, 67108739, 67108859, 133955587
Offset: 1

Author

Brad Clardy, Apr 05 2013

Keywords

Comments

These are the primes arising in A224380.

Crossrefs

Cf. A224380.

A224380 Table read by antidiagonals of numbers of form (2^n -1)*2^(m+2) + 3 where n>=1, m>=1.

Original entry on oeis.org

11, 19, 27, 35, 51, 59, 67, 99, 115, 123, 131, 195, 227, 243, 251, 259, 387, 451, 483, 499, 507, 515, 771, 899, 963, 995, 1011, 1019, 1027, 1539, 1795, 1923, 1987, 2019, 2035, 2043, 2051, 3075, 3587, 3843, 3971, 4035, 4067, 4083, 4091, 4099, 6147, 7171, 7683, 7939, 8067, 8131, 8163, 8179
Offset: 1

Author

Brad Clardy, Apr 05 2013

Keywords

Comments

The table has row labels 2^n - 1 and column labels 2^(m+2). The table entry is row*col + 3. A MAGMA program is provided that generates the numbers in a table format. The sequence is read along the antidiagonals starting from the top left corner. Using the lexicographic ordering of A057555 the sequence is:
A(n) = Table(i,j) with (i,j)=(1,1),(1,2),(2,1),(1,3),(2,2),(3,1)...
+3 | 8 16 32 64 128 256 512 ...
----|-------------------------------------------
1 | 11 19 35 67 131 259 515
3 | 27 51 99 195 387 771 1539
7 | 59 115 227 451 899 1795 3587
15 | 123 243 483 963 1923 3843 7683
31 | 251 499 995 1987 3971 7939 15875
63 | 507 1011 2019 4035 8067 16131 32259
127 | 1019 2035 4067 8131 16259 32515 65027
...
All of these numbers have the following property: let m be a member of A(n); if a sequence B(n) = all i such that i XOR (m - 1) = i - (m - 1), then the differences between successive members of B(n) is an alternating series of 1's and 3's with the last difference in the pattern m. The number of alternating 1's and 3's in the pattern is 2^(j+1) - 1, where j is the column index.
As an example consider A(1) which is 11, the sequence B(n) where i XOR 10 = i - 10 starts as 10, 11, 14, 15, 26, 27, 30, 31, 42, ... (A214864) with successive differences of 1, 3, 1, 11.
Main diagonal is A191341, the largest k such that k-1 and k+1 in binary representation have the same number of 1's and 0's

Crossrefs

Cf. A057555(lexicographic ordering), A214864(example), A224195.
Rows: A062729(i=1), A147595(2 n>=5), A164285(3 n>=3).
Cols: A168616(j=1 n>=4).
Diagonal: A191341.

Programs

  • Magma
    //program generates values in a table form,row labels of 2^i -1
    for i:=1 to 10 do
        m:=2^i - 1;
        m, [ m*2^n +1 : n in [1..10]];
    end for;
    //program generates sequence in lexicographic ordering of A057555, read
    //along antidiagonals from top. Primes in the sequence are marked with *.
    for i:=2 to 18 do
        for j:=1 to i-1 do
           m:=2^j -1;
           k:=m*2^(2+i-j) + 3;
           if IsPrime(k) then k, "*";
              else k;
           end if;;
        end for;
    end for;

Formula

a(n) = 2^(A057555(2*n - 1))*2^(A057555(2*n) + 2) + 3 for n>=1.