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

A016038 Strictly non-palindromic numbers: n is not palindromic in any base b with 2 <= b <= n-2.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 11, 19, 47, 53, 79, 103, 137, 139, 149, 163, 167, 179, 223, 263, 269, 283, 293, 311, 317, 347, 359, 367, 389, 439, 491, 563, 569, 593, 607, 659, 739, 827, 853, 877, 977, 983, 997, 1019, 1049, 1061, 1187, 1213, 1237, 1367, 1433, 1439, 1447, 1459
Offset: 1

Views

Author

Keywords

Comments

All elements of the sequence greater than 6 are prime (ab = a(b-1) + a or a^2 = (a-1)^2 + 2(a-1) + 1). Mersenne and Fermat primes are not in the sequence.
Additional comments: if you can factor a number as a*b then it is a palindrome in base b-1, where b is the larger of the two factors. (If the number is a square, then it can be a palindrome in an additional way, in base (sqrt(n)-1)). The a*b form does not work when a = b-1, but of course there are no two consecutive primes (other than 2,3, which explains the early special cases), so if you can factor a number as a*(a-1), then another factorization also exists. - Michael B Greenwald (mbgreen(AT)central.cis.upenn.edu), Jan 01 2002
Note that no prime p is palindromic in base b for the range sqrt(p) < b < p-1. Hence to find non-palindromic primes, we need only examine bases up to floor(sqrt(p)), which greatly reduces the computational effort required. - T. D. Noe, Mar 01 2008
No number n is palindromic in any base b with n/2 <= b <= n-2, so this is also numbers not palindromic in any base b with 2 <= b <= n/2.
Sequence A047811 (this sequence without 0, 1, 2, 3) is mentioned in the Guy paper, in which he reports on unsolved problems. This problem came from Mario Borelli and Cecil B. Mast. The paper poses two questions about these numbers: (1) Can palindromic or nonpalindromic primes be otherwise characterized? and (2) What is the cardinality, or the density, of the set of palindromic primes? Of the set of nonpalindromic primes? - T. D. Noe, Apr 18 2011
From Robert G. Wilson v, Oct 22 2014 and Nov 03 2014: (Start)
Define f(n) to be the number of palindromic representations of n in bases b with 1 < b < n, see A135551.
For A016038, f(n) = 1 for all n. Only the numbers n = 0, 1, 4 and 6 are not primes.
For f(n) = 2, all terms are prime or semiprimes (prime omega <= 2 (A037143)) with the exception of 8 and 12;
For f(n) = 3, all terms are at most 3-almost primes (prime omega <= 3 (A037144)), with the exception of 16, 32, 81 and 625;
For f(n) = 4, all terms are at most 4-almost primes, with the exception of 64 and 243;
For f(n) = 5, all terms are at most 5-almost primes, with the exception of 128, 256 and 729;
For f(n) = 6, all terms are at most 6-almost primes, with the sole exception of 2187;
For f(n) = 7, all terms are at most 7-almost primes, with the exception of 512, 2048 and 19683; etc. (End)

References

  • Paul Guinand, Strictly non-palindromic numbers, unpublished note, 1996.

Crossrefs

Programs

  • Mathematica
    PalindromicQ[n_, base_] := FromDigits[Reverse[IntegerDigits[n, base]], base] == n; PalindromicBases[n_] := Select[Range[2, n-2], PalindromicQ[n, # ] &]; StrictlyPalindromicQ[n_] := PalindromicBases[n] == {}; Select[Range[150], StrictlyPalindromicQ] (* Herman Beeksma, Jul 16 2005*)
    palindromicBases[n_] := Module[{p}, Table[p = IntegerDigits[n, b]; If[ p == Reverse[p], {b, p}, Sequence @@ {}], {b, 2, n - 2}]]; lst = {0, 1, 4, 6}; Do[ If[ Length@ palindromicBases@ Prime@n == 0, AppendTo[lst, Prime@n]], {n, 10000}]; lst (* Robert G. Wilson v, Mar 08 2008 *)
    Select[Range@ 1500, Function[n, NoneTrue[Range[2, n - 2], PalindromeQ@ IntegerDigits[n, #] &]]] (* Michael De Vlieger, Dec 24 2017 *)
  • PARI
    is(n)=!for(b=2,n\2,Vecrev(d=digits(n,b))==d&&return) \\ M. F. Hasler, Sep 08 2015
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.factor_ import digits
    def A016038_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n: all((s := digits(n,b)[1:])[:(t:=len(s)+1>>1)]!=s[:-t-1:-1] for b in range(2,n-1)), count(max(startvalue,0)))
    A016038_list = list(islice(A016038_gen(),30)) # Chai Wah Wu, Jan 17 2024

Formula

a(n) = A047811(n-4) for n > 4. - M. F. Hasler, Sep 08 2015

Extensions

Extended and corrected by Patrick De Geest, Oct 15 1999
Edited by N. J. A. Sloane, Apr 09 2008

A065531 Number of palindromes in all base b representations for n, for 2<=b<=n.

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, Dec 02 2001

Keywords

Comments

a(1) = 1 by convention, which makes this sequence different from A135551.
Index of first occurrence of k in A037183. - Robert G. Wilson v, Oct 27 2014

Crossrefs

Essentially the same as A135551.

Programs

A050813 Numbers n not palindromic in any base b, 2 <= b <= 10.

Original entry on oeis.org

19, 39, 47, 53, 58, 69, 75, 76, 79, 84, 87, 90, 94, 95, 96, 102, 103, 106, 108, 110, 115, 116, 120, 122, 132, 133, 134, 137, 139, 140, 143, 144, 147, 149, 152, 155, 158, 159, 163, 167, 168, 169, 174, 175, 176, 177, 179, 180, 183, 184, 187, 188, 193, 196, 198
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1999

Keywords

Crossrefs

Cf. A214423, A214424, A214425, A214426 (palindromic in 1-4 bases).

Programs

  • Mathematica
    n = -1; t = {}; While[Length[t] < 100, n++; If[Count[Table[s = IntegerDigits[n, m]; s == Reverse[s], {m, 2, 10}], True] == 0, AppendTo[t, n]]]; t (* T. D. Noe, Jul 18 2012 *)

Formula

A050812(n) = 0.

A126071 Number of bases (2 <= b <= n+1) in which n is a palindrome.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 3, 3, 3, 4, 2, 3, 3, 3, 4, 4, 4, 4, 2, 4, 5, 3, 3, 5, 3, 5, 4, 5, 3, 4, 4, 4, 4, 4, 3, 6, 3, 4, 3, 6, 3, 5, 3, 4, 5, 5, 2, 6, 3, 5, 5, 6, 2, 5, 5, 5, 5, 3, 3, 7, 3, 4, 6, 5, 6, 5, 4, 5, 3, 5, 3, 7, 4, 4, 4, 4, 3, 7, 2, 8, 4, 5, 3, 7, 6, 4, 3
Offset: 1

Views

Author

Paul Richards, Mar 01 2007

Keywords

Comments

a(n) >= 1, since n will always have a single "digit" in base n+1.

Examples

			From bases 2 to 9 respectively, 8 can be represented as: 1000, 22, 20, 13, 12, 11, 10, 8. Three of those are symmetrical (22, 11, 8) and so a(8) = 3.
		

Crossrefs

Cf. A016026.
Cf. A016038, A047811 (related to numbers having 2 bases).

Programs

Extensions

Extended by T. D. Noe, Oct 04 2012

A138329 List of strictly non-palindromic twin primes {p, p+2}.

Original entry on oeis.org

137, 139, 4337, 4339, 8291, 8293, 9419, 9421, 10937, 10939, 13757, 13759, 19427, 19429, 20981, 20983, 36011, 36013, 38327, 38329, 43397, 43399, 59441, 59443, 71327, 71329, 74717, 74719, 76871, 76873, 90437, 90439, 91571, 91573, 117239
Offset: 1

Views

Author

Karl Hovekamp, Mar 14 2008

Keywords

Comments

The strictly non-palindromic twin primes are a part of the normal twin primes. See the list of twin primes A077800 and A016038 for the strictly non-palindromic numbers.

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

Formula

Twin primes, where both numbers {p} and {p+2} are strictly non-palindromic.

A138358 List of triples of strictly non-palindromic primes without an ordinary prime in between.

Original entry on oeis.org

137, 139, 149, 1433, 1439, 1447, 4337, 4339, 4349, 5297, 5303, 5309, 8287, 8291, 8293, 13049, 13063, 13093, 30293, 30307, 30313, 36007, 36011, 36013, 43391, 43397, 43399
Offset: 1

Views

Author

Karl Hovekamp, Mar 16 2008

Keywords

Comments

Up to 10^9 there are 2992 triples of strictly non-palindromic primes if the quadruples and quintuples are not counted.
For quadruples of this kind, see A138359.
For quintuples of this kind, see A138360.

Examples

			Primes:
...
113 is palindromic in base 8
127 is palindromic in base 2 and base 9
131 is palindromic in base 10
137 is strictly non-palindromic
139 is strictly non-palindromic
149 is strictly non-palindromic
151 is palindromic in base 3 and base 10
157 is palindromic in base 7 and base 12
...
So {137, 139, 149} is the first triple of strictly non-palindromic primes.
		

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

Formula

A small fraction of the primes are strictly non-palindromic. Notice that all strictly non-palindromic numbers >6 are prime! (see: A016038) Triples of these strictly non-palindromic primes, without any normal prime in between, are listed here.

A138359 List of quadruples of strictly non-palindromic primes without an ordinary prime in between them.

Original entry on oeis.org

44449, 44453, 44483, 44491, 120811, 120817, 120823, 120829, 315037, 315047, 315059, 315067, 583069, 583087, 583127, 583139, 617411, 617429, 617447, 617453, 1553423, 1553429, 1553437, 1553467, 1712329, 1712339, 1712353, 1712369
Offset: 1

Views

Author

Karl Hovekamp, Mar 16 2008

Keywords

Comments

For triples of this kind, see A138358.
For quintuples of this kind, see A138360.

Examples

			Primes:
...
44417 palindromic in bases 50, 106, 135 and 141
44449 strictly non-palindromic
44453 strictly non-palindromic
44483 strictly non-palindromic
44491 strictly non-palindromic
44497 palindromic in base 67 and base 206
...
So {44449, 44453, 44483, 44491} is the first quadruple of strictly non-palindromic primes.
		

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

A138360 Quintuples of 5 consecutive strictly non-palindromic primes.

Original entry on oeis.org

3253177, 3253219, 3253223, 3253231, 3253241, 20189111, 20189119, 20189123, 20189137, 20189167, 22122937, 22122979, 22122983, 22123021, 22123043, 61309069, 61309081, 61309091, 61309093, 61309097, 89073521, 89073533, 89073583, 89073599, 89073613
Offset: 1

Views

Author

Karl Hovekamp, Mar 16 2008

Keywords

Comments

The quintuples T(n,1), T(n,2), .. T(n,5), n>=1, in this array are 5 consecutive primes (consecutive in A000040) which are also members of A016038.
Notice that all strictly non-palindromic numbers >6 are prime! (See A016038.) Quintuples of these strictly non-palindromic primes, without any normal prime in between, are listed here.
Up to 1 billion there are only 5 quintuples of strictly non-palindromic primes. May be that there are no more quintuples of this kind. Up to 1 billion there are no n-tuples of strictly non-palindromic primes with n>5.

Examples

			Primes:
...
3253153 palindromic in bases 203, 356, 495, 1316, 1442, 1504 and 1648
3253177 strictly non-palindromic
3253219 strictly non-palindromic
3253223 strictly non-palindromic
3253231 strictly non-palindromic
3253241 strictly non-palindromic
3253253 palindromic in bases 653, 768, 910 and 1001
...
So {3253177, 3253219, 3253223, 3253231, 3253241} is the first quintuple of the strictly non-palindromic primes.
		

References

  • Karl Hovekamp, Palindromzahlen in adischen Zahlensystemen, 2004

Crossrefs

Cf. A138358 (triples), A138359 (4-tuples), A138329, A016038, A047811, A016038.

Extensions

More terms from Mauro Fiorentini, Jan 03 2016
Showing 1-8 of 8 results.